From 7d02fa59d784a785cc06fbea5f01a92ab8d5a53e Mon Sep 17 00:00:00 2001 From: Simon Eskildsen Date: Fri, 14 Mar 2014 16:17:18 -0400 Subject: [PATCH] examples: change size to integer --- README.md | 14 +++++++------- examples/text.go | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 3df3e12..30cc6f2 100644 --- a/README.md +++ b/README.md @@ -13,16 +13,16 @@ or Splunk: ```json {"animal":"walrus","level":"info","msg":"A group of walrus emerges from the -ocean","size":"10","time":"2014-03-10 19:57:38.562264131 -0400 EDT"} +ocean","size":10,"time":"2014-03-10 19:57:38.562264131 -0400 EDT"} {"level":"warning","msg":"The group's number increased tremendously!", "number":122,"omg":true,"time":"2014-03-10 19:57:38.562471297 -0400 EDT"} {"animal":"walrus","level":"info","msg":"A giant walrus appears!", -"size":"10","time":"2014-03-10 19:57:38.562500591 -0400 EDT"} +"size":10,"time":"2014-03-10 19:57:38.562500591 -0400 EDT"} {"animal":"walrus","level":"info","msg":"Tremendously sized cow enters the ocean.", -"size":"9","time":"2014-03-10 19:57:38.562527896 -0400 EDT"} +"size":9,"time":"2014-03-10 19:57:38.562527896 -0400 EDT"} {"level":"fatal","msg":"The ice breaks!","number":100,"omg":true, "time":"2014-03-10 19:57:38.562543128 -0400 EDT"} @@ -32,10 +32,10 @@ With the default `log.Formatter = new(logrus.TextFormatter)` when a TTY is not attached: ```text -time='2014-03-14 13:00:31.751756799 -0400 EDT' level='info' msg='A group of walrus emerges from the ocean' animal='walrus' size='10' -time='2014-03-14 13:00:31.751994265 -0400 EDT' level='warning' msg='The group's number increased tremendously!' omg=true number=122 -time='2014-03-14 13:00:31.752018319 -0400 EDT' level='info' msg='A giant walrus appears!' animal='walrus' size='10' -time='2014-03-14 13:00:31.752034139 -0400 EDT' level='info' msg='Tremendously sized cow enters the ocean.' animal='walrus' size='9' +time='2014-03-14 13:00:31.751756799 -0400 EDT' level='info' msg='A group of walrus emerges from the ocean' animal='walrus' size=10 +time='2014-03-14 13:00:31.751994265 -0400 EDT' level='warning' msg='The group's number increased tremendously!' omg=true number=122 +time='2014-03-14 13:00:31.752018319 -0400 EDT' level='info' msg='A giant walrus appears!' animal='walrus' size=10 +time='2014-03-14 13:00:31.752034139 -0400 EDT' level='info' msg='Tremendously sized cow enters the ocean.' animal='walrus' size=9 time='2014-03-14 13:00:31.752048504 -0400 EDT' level='fatal' msg='The ice breaks!' omg=true number=100 ``` diff --git a/examples/text.go b/examples/text.go index 3285f9d..b96f833 100644 --- a/examples/text.go +++ b/examples/text.go @@ -11,7 +11,7 @@ func main() { for { log.WithFields(logrus.Fields{ "animal": "walrus", - "size": "10", + "size": 10, }).Print("A group of walrus emerges from the ocean") log.WithFields(logrus.Fields{ @@ -21,12 +21,12 @@ func main() { log.WithFields(logrus.Fields{ "animal": "walrus", - "size": "10", + "size": 10, }).Print("A giant walrus appears!") log.WithFields(logrus.Fields{ "animal": "walrus", - "size": "9", + "size": 9, }).Print("Tremendously sized cow enters the ocean.") log.WithFields(logrus.Fields{