console_adapter.go (624B)
1 package log 2 3 import ( 4 golog "log" 5 ) 6 7 type ConsoleLogAdapter struct { 8 } 9 10 func NewConsoleLogAdapter() LogAdapter { 11 return new(ConsoleLogAdapter) 12 } 13 14 func (cla *ConsoleLogAdapter) Debugf(lc *LogContext, message *string) error { 15 golog.Println(*message) 16 17 return nil 18 } 19 20 func (cla *ConsoleLogAdapter) Infof(lc *LogContext, message *string) error { 21 golog.Println(*message) 22 23 return nil 24 } 25 26 func (cla *ConsoleLogAdapter) Warningf(lc *LogContext, message *string) error { 27 golog.Println(*message) 28 29 return nil 30 } 31 32 func (cla *ConsoleLogAdapter) Errorf(lc *LogContext, message *string) error { 33 golog.Println(*message) 34 35 return nil 36 }