keep the short name for logs
Showing
1 changed file
with
15 additions
and
3 deletions
| ... | @@ -298,21 +298,33 @@ func (bl *BeeLogger) Debug(format string, v ...interface{}) { | ... | @@ -298,21 +298,33 @@ func (bl *BeeLogger) Debug(format string, v ...interface{}) { |
| 298 | // | 298 | // |
| 299 | // Deprecated: compatibility alias for Warning(), Will be removed in 1.5.0. | 299 | // Deprecated: compatibility alias for Warning(), Will be removed in 1.5.0. |
| 300 | func (bl *BeeLogger) Warn(format string, v ...interface{}) { | 300 | func (bl *BeeLogger) Warn(format string, v ...interface{}) { |
| 301 | bl.Warning(format, v...) | 301 | if LevelWarning > bl.level { |
| 302 | return | ||
| 303 | } | ||
| 304 | msg := fmt.Sprintf("[W] "+format, v...) | ||
| 305 | bl.writerMsg(LevelWarning, msg) | ||
| 302 | } | 306 | } |
| 303 | 307 | ||
| 304 | // Log INFO level message. | 308 | // Log INFO level message. |
| 305 | // | 309 | // |
| 306 | // Deprecated: compatibility alias for Informational(), Will be removed in 1.5.0. | 310 | // Deprecated: compatibility alias for Informational(), Will be removed in 1.5.0. |
| 307 | func (bl *BeeLogger) Info(format string, v ...interface{}) { | 311 | func (bl *BeeLogger) Info(format string, v ...interface{}) { |
| 308 | bl.Informational(format, v...) | 312 | if LevelInformational > bl.level { |
| 313 | return | ||
| 314 | } | ||
| 315 | msg := fmt.Sprintf("[I] "+format, v...) | ||
| 316 | bl.writerMsg(LevelInformational, msg) | ||
| 309 | } | 317 | } |
| 310 | 318 | ||
| 311 | // Log TRACE level message. | 319 | // Log TRACE level message. |
| 312 | // | 320 | // |
| 313 | // Deprecated: compatibility alias for Debug(), Will be removed in 1.5.0. | 321 | // Deprecated: compatibility alias for Debug(), Will be removed in 1.5.0. |
| 314 | func (bl *BeeLogger) Trace(format string, v ...interface{}) { | 322 | func (bl *BeeLogger) Trace(format string, v ...interface{}) { |
| 315 | bl.Debug(format, v...) | 323 | if LevelDebug > bl.level { |
| 324 | return | ||
| 325 | } | ||
| 326 | msg := fmt.Sprintf("[D] "+format, v...) | ||
| 327 | bl.writerMsg(LevelDebug, msg) | ||
| 316 | } | 328 | } |
| 317 | 329 | ||
| 318 | // flush all chan data. | 330 | // flush all chan data. | ... | ... |
-
Please register or sign in to post a comment