Skip to content

move syslog-tag to syslog.New function#12329

Closed
x1022as wants to merge 1 commit intomoby:masterfrom
x1022as:syslog-tag
Closed

move syslog-tag to syslog.New function#12329
x1022as wants to merge 1 commit intomoby:masterfrom
x1022as:syslog-tag

Conversation

@x1022as
Copy link
Copy Markdown
Contributor

@x1022as x1022as commented Apr 13, 2015

move syslog-tag to syslog.New()
With tremendous log, this may cost less.
<tag> makes it easy to parse the log.

Signed-off-by: Deng Guangxing [email protected]

@LK4D4
Copy link
Copy Markdown
Contributor

LK4D4 commented Apr 13, 2015

ping @ibuildthecloud

@LK4D4
Copy link
Copy Markdown
Contributor

LK4D4 commented Apr 13, 2015

This will change log-format, so we should decide it right now or never.
ping @jfrazelle @crosbymichael
ping @wlan0

@crosbymichael
Copy link
Copy Markdown
Contributor

What is standard for syslog message format?

@calavera
Copy link
Copy Markdown
Contributor

Having the "before and after this patch" look of the log would be super helpful. ✨ ⚡ ✨

@LK4D4
Copy link
Copy Markdown
Contributor

LK4D4 commented Apr 13, 2015

Before:

Apr 13 10:13:53 minigrind docker[26539]: 7c3541396dc7: 64 bytes from 216.58.192.14: seq=12 ttl=54 time=5.181 ms

After

Apr 13 10:15:39 minigrind docker[6109]: <37ecf2e1468d> [6109]: 64 bytes from 216.58.192.14: seq=7 ttl=54 time=5.028 ms

@LK4D4
Copy link
Copy Markdown
Contributor

LK4D4 commented Apr 13, 2015

I'm not sure why it looks like this. Maybe because of journalctl, seems like it omits tag if it's application name.

@wlan0
Copy link
Copy Markdown
Contributor

wlan0 commented Apr 13, 2015

The standard for syslog format is here https://tools.ietf.org/html/rfc5424#section-6.5

This is the before and after

before:

Apr 10 02:44:08 ubuntu docker-1.5.0-dev[102836]: 7dc4298c357d: [1] 10 Apr 09:44:08.757 # Server started, Redis version 2.8.19

after

Apr 10 02:49:33 ubuntu docker-1.5.0-dev: <ce93fea37d12>[103905]: [1] 10 Apr 09:49:33.393 # Server started, Redis version 2.8.19

@LK4D4
Copy link
Copy Markdown
Contributor

LK4D4 commented Apr 13, 2015

@wlan0 WDYT overall about this change?

@wlan0
Copy link
Copy Markdown
Contributor

wlan0 commented Apr 13, 2015

@LK4D4 It makes parsing easier. 👍

@LK4D4
Copy link
Copy Markdown
Contributor

LK4D4 commented Apr 13, 2015

@wlan0 Cool, thank you very much.
ping @jfrazelle let's add it to milestone. It is pretty small change, shouldn't affect anything.

@jessfraz
Copy link
Copy Markdown
Contributor

cool added and moved to code review :)

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.

Could you replace this with logrus.Error(err)?

@crosbymichael
Copy link
Copy Markdown
Contributor

I opened #12340 with this commit but removing the println

@ibuildthecloud
Copy link
Copy Markdown
Contributor

Fwiw, I think this makes the log harder to read. Before it was clearly process_name[pid] like most syslog. Now it's process_name: id[pid].

@ibuildthecloud
Copy link
Copy Markdown
Contributor

@LK4D4 Sorry I wasn't around earlier, I think you should revert this.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants