另客网go项目公用的代码库

123456789101112131415161718192021222324252627
  1. package log
  2. // Debug is a convenient alias for Root().Debug
  3. func Debug(msg string, ctx ...interface{}) {
  4. logger.Debug(msg, ctx)
  5. }
  6. // Info is a convenient alias for Root().Info
  7. func Info(msg string, ctx ...interface{}) {
  8. logger.Info(msg, ctx)
  9. }
  10. // Warn is a convenient alias for Root().Warn
  11. func Warn(msg string, ctx ...interface{}) {
  12. logger.Warn(msg, ctx)
  13. }
  14. // Error is a convenient alias for Root().Error
  15. func Error(msg string, ctx ...interface{}) {
  16. logger.Error(msg, ctx)
  17. }
  18. // Fatal is a convenient alias for Root().Crit
  19. func Fatal(msg string, ctx ...interface{}) {
  20. logger.Fatal(msg, ctx)
  21. }