Skip to content

feat(log): Add json console log formatter#12

Open
rvadim wants to merge 1 commit intomailgun:masterfrom
rvadim:json-console-logger
Open

feat(log): Add json console log formatter#12
rvadim wants to merge 1 commit intomailgun:masterfrom
rvadim:json-console-logger

Conversation

@rvadim
Copy link
Copy Markdown

@rvadim rvadim commented Nov 30, 2015

If set log config to "name: json_console", messages to stdout will be in
json format each message is one object. It is conveniently for sending
logs to elasticsearch storage.

Tested with master branch of vulcand. Generating messages like

{"appname":"vulcand","filename":"supervisor.go","function":"github.com/vulcand/vulcand/supervisor.initProxy","linenumber":356,"message":"No frontends found","pid":25521,"severity":2,"timestamp":"Nov 30 03:59:00.130"}

if set log config to name: json_console, messages to stdout will be in
json format each message is one object. It is conveniently for sending
logs to elastic search storage.
Comment thread json_console.go
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NewJsonConsoleLogger -> NewJSONConsoleLogger (check out https://github.com/golang/go/wiki/CodeReviewComments#initialisms)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants