Skip to content

Commit ae252e0

Browse files
joeybloggsjoeybloggs
authored andcommitted
update README + some docs
1 parent 9a6ad51 commit ae252e0

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,15 @@ func (c *CustomHandler) Run() chan<- *log.Entry {
105105

106106
// below prints to os.Stderr but could marshal to JSON
107107
// and send to central logging server
108-
// ---------
109-
// |----------> | console |
110-
// Addding this check for when you are doing centralized logging | ---------
111-
// i.e. ----------------- ----------------- ------------- --------
112-
// | app log handler | -- json --> | central log app | -- unmarshal json to Entry -> | log handler | --> | syslog |
113-
// ----------------- ----------------- ------------- --------
114-
// | ---------
115-
// |----------> | DataDog |
116-
// ---------
108+
// ---------
109+
// |----------> | console |
110+
// | ---------
111+
// i.e. ----------------- ----------------- Unmarshal ------------- --------
112+
// | app log handler | -- json --> | central log app | -- to -> | log handler | --> | syslog |
113+
// ----------------- ----------------- Entry ------------- --------
114+
// | ---------
115+
// |----------> | DataDog |
116+
// ---------
117117
var e *log.Entry
118118
b := new(bytes.Buffer)
119119

@@ -181,6 +181,10 @@ Log Level Definitions
181181

182182
**FatalLevel** - Should be corrected immediately, but indicates failure in a primary system, an example is a loss of a backup ISP connection. ( same as SYSLOG CRITICAL )
183183

184+
More Handlers
185+
-------------
186+
Pull requests for new handlers are welcome, please provide test coverage is all I ask.
187+
184188
Special Thanks
185189
--------------
186190
Special thanks to the following libraries that inspired

examples/custom-handler/main.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ func (c *CustomHandler) Run() chan<- *log.Entry {
2525

2626
// below prints to os.Stderr but could marshal to JSON
2727
// and send to central logging server
28-
// ---------
29-
// |----------> | console |
30-
// Addding this check for when you are doing centralized logging | ---------
31-
// i.e. ----------------- ----------------- ------------- --------
32-
// | app log handler | -- json --> | central log app | -- unmarshal json to Entry -> | log handler | --> | syslog |
33-
// ----------------- ----------------- ------------- --------
34-
// | ---------
35-
// |----------> | DataDog |
36-
// ---------
28+
// ---------
29+
// |----------> | console |
30+
// | ---------
31+
// i.e. ----------------- ----------------- Unmarshal ------------- --------
32+
// | app log handler | -- json --> | central log app | -- to -> | log handler | --> | syslog |
33+
// ----------------- ----------------- Entry ------------- --------
34+
// | ---------
35+
// |----------> | DataDog |
36+
// ---------
3737
var e *log.Entry
3838
b := new(bytes.Buffer)
3939

0 commit comments

Comments
 (0)