title: Use struct in place of map in logrus logging
body: <p>I'm using the <a href="https://github.com/sirupsen/logrus" rel="nofollow noreferrer">logrus</a> package for logging in a Go project.
  To display key value pairs in logs, the docs give the following format:</p>
  <pre><code>log.WithFields(log.Fields{
      &quot;animal&quot;: &quot;walrus&quot;,
      &quot;size&quot;:   10,
    }).Info(&quot;A group of walrus emerges from the ocean&quot;)
  </code></pre>
  <p>Instead of using string keys manually in each log, I wish to use a common struct across all logs (to avoid chances of typos in keys).</p>
  <p>Something like this:</p>
  <pre><code>type LogMessage struct {
      Status  bool        `json:&quot;status&quot;`
      Message string      `json:&quot;message&quot;`
  }
  
  log.WithFields(&amp;LogMessage {Status: false, Message: &quot;Error User Already Exists&quot;}).Info(&quot;User Creation Failed.&quot;)
  </code></pre>
  <p>The log output should be as :</p>
  <pre><code>time=&quot;2015-03-26T01:27:38-04:00&quot; level=info msg=&quot;User Creation Failed.&quot; status=false message=&quot;Error User Already Exists&quot;
  </code></pre>
  <p>How can this be implemented ?</p>
  <p>Thanks for any help !</p>