@@ -51,46 +51,50 @@ func (l *Logger) onError(error error, entry Entry) {
5151
5252// Debug will log a debug message
5353func (l * Logger ) Debug (message string , fields ... Field ) {
54- l .Log (message , DebugLevel , fields ... )
54+ l .log (message , DebugLevel , fields ... )
5555}
5656
5757// Info will log a info message
5858func (l * Logger ) Info (message string , fields ... Field ) {
59- l .Log (message , InfoLevel , fields ... )
59+ l .log (message , InfoLevel , fields ... )
6060}
6161
6262// Notice will log a notice message
6363func (l * Logger ) Notice (message string , fields ... Field ) {
64- l .Log (message , NoticeLevel , fields ... )
64+ l .log (message , NoticeLevel , fields ... )
6565}
6666
6767// Warning will log a warning message
6868func (l * Logger ) Warning (message string , fields ... Field ) {
69- l .Log (message , WarningLevel , fields ... )
69+ l .log (message , WarningLevel , fields ... )
7070}
7171
7272// Error will log a message
7373func (l * Logger ) Error (message string , fields ... Field ) {
74- l .Log (message , ErrorLevel , fields ... )
74+ l .log (message , ErrorLevel , fields ... )
7575}
7676
7777// Critical will log a critical message
7878func (l * Logger ) Critical (message string , fields ... Field ) {
79- l .Log (message , CriticalLevel , fields ... )
79+ l .log (message , CriticalLevel , fields ... )
8080}
8181
8282// Alert will log a alert message
8383func (l * Logger ) Alert (message string , fields ... Field ) {
84- l .Log (message , AlertLevel , fields ... )
84+ l .log (message , AlertLevel , fields ... )
8585}
8686
8787// Emergency will log a emergency message
8888func (l * Logger ) Emergency (message string , fields ... Field ) {
89- l .Log (message , EmergencyLevel , fields ... )
89+ l .log (message , EmergencyLevel , fields ... )
9090}
9191
9292// Log will log a message with a given level
9393func (l * Logger ) Log (message string , level Level , fields ... Field ) {
94+ l .log (message , level , fields ... )
95+ }
96+
97+ func (l * Logger ) log (message string , level Level , fields ... Field ) {
9498 entry := Entry {message , level , NewContext (fields ... )}
9599 if err := l .handler (entry ); err != nil {
96100 l .onError (err , entry )
0 commit comments