You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
769 B

10 years ago
10 years ago
  1. // Copyright 2014 The Gogs Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. // Package log is a wrapper of logs for short calling name.
  5. package log
  6. import (
  7. "github.com/gogits/logs"
  8. )
  9. var logger *logs.BeeLogger
  10. func init() {
  11. logger = logs.NewLogger(10000)
  12. logger.SetLogger("console", "")
  13. }
  14. func Trace(format string, v ...interface{}) {
  15. logger.Trace(format, v...)
  16. }
  17. func Info(format string, v ...interface{}) {
  18. logger.Info(format, v...)
  19. }
  20. func Error(format string, v ...interface{}) {
  21. logger.Error(format, v...)
  22. }
  23. func Warn(format string, v ...interface{}) {
  24. logger.Warn(format, v...)
  25. }
  26. func Critical(format string, v ...interface{}) {
  27. logger.Critical(format, v...)
  28. }