Merge pull request #7 from aybabtme/third_party_formatter

Add link to third party formatter in README.
This commit is contained in:
Simon Eskildsen 2014-03-14 16:57:04 -04:00
commit f33bbddc25
1 changed files with 6 additions and 2 deletions

View File

@ -166,12 +166,16 @@ Splunk or Logstash.
#### Formatters #### Formatters
The built logging formatters are: The built-in logging formatters are:
* `logrus.TextFormatter`. Logs the event in colors if stdout is a tty, otherwise * `logrus.TextFormatter`. Logs the event in colors if stdout is a tty, otherwise
without colors. without colors.
* `logrus.JSONFormatter`. Logs fields as JSON. * `logrus.JSONFormatter`. Logs fields as JSON.
Third party logging formatters:
* [`github.com/aybabtme/logzalgo.ZalgoFormatter`](https://github.com/aybabtme/logzalgo): invoking the P͉̫o̳̼̊w̖͈̰͎e̬͔̭͂r͚̼̹̲ ̫͓͉̳͈ō̠͕͖̚f̝͍̠ ͕̲̞͖͑Z̖̫̤̫ͪa͉̬͈̗l͖͎g̳̥o̰̥̅!̣͔̲̻͊̄ ̙̘̦̹̦.
You can define your formatter by implementing the `Formatter` interface, You can define your formatter by implementing the `Formatter` interface,
requiring a `Format` method. `Format` takes an `*Entry`. `entry.Data` is a requiring a `Format` method. `Format` takes an `*Entry`. `entry.Data` is a
`Fields` type (`map[string]interface{}`) with all your fields as well as the `Fields` type (`map[string]interface{}`) with all your fields as well as the