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
|
|
@ -23,7 +23,11 @@ func NewConsole(format string, sessions chan *base.Session) Notifier {
|
|||
func (c *Console) Run() {
|
||||
log.Info("Starting console notifier")
|
||||
for session := range c.sessions {
|
||||
log.Info(session.Format(c.format))
|
||||
if c.format == "json" {
|
||||
log.Info(session.JSON())
|
||||
} else {
|
||||
log.Info(session.Format(c.format))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue