feat: Add JSON logging
Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
parent
18cbc70495
commit
e72feaf0f6
8 changed files with 77 additions and 13 deletions
|
|
@ -53,7 +53,11 @@ func (s *Syslog) Run() {
|
|||
base.Panic(err)
|
||||
}
|
||||
for session := range s.sessions {
|
||||
s.writer.Info(session.Format(s.format))
|
||||
if s.format == "json" {
|
||||
s.writer.Info(session.JSON())
|
||||
} else {
|
||||
s.writer.Info(session.Format(s.format))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue