Skip to content

Commit a770a2c

Browse files
author
Matthew Fisher
committed
fix(logger): remove Source and Tag from output
An application's logs should not contain which host it was listed on. It should only care about the data that is relevant to it. The Tag field is unused, so this added an extra whitespace to the log format. Removing it cleans up the logs a bit.
1 parent 0220c55 commit a770a2c

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

logger/syslog/message.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ func (m *Message) NetSrc() string {
3636
func (m *Message) String() string {
3737
timeLayout := "2006-01-02 15:04:05"
3838
return fmt.Sprintf(
39-
"%s %s %s %s%s",
40-
m.Time.Format(timeLayout), m.Source,
41-
m.Hostname, m.Tag, m.Content,
39+
"%s %s %s",
40+
m.Time.Format(timeLayout),
41+
m.Hostname,
42+
m.Content,
4243
)
4344
}

0 commit comments

Comments
 (0)