Documentation ¶
Index ¶
- Constants
- func Config(v ...interface{})
- func Configf(format string, v ...interface{})
- func Debug(v ...interface{})
- func Debugf(format string, v ...interface{})
- func Error(v ...interface{})
- func Errorf(format string, v ...interface{})
- func Fatal(v ...interface{})
- func Fatalf(format string, v ...interface{})
- func GetColorize(colorCode int, s string) string
- func GetColorizeFormat(colorFormat string, colorCode int, s string) string
- func Info(v ...interface{})
- func Infof(format string, v ...interface{})
- func Json(lv int, v interface{})
- func JsonSign(v interface{})
- func Print(lv int, v ...interface{})
- func Printf(lv int, format string, v ...interface{})
- func Prompt(v ...interface{})
- func Promptf(format string, v ...interface{})
- func SetAbs(abs int)
- func SetColor(open int)
- func SetLevel(level int)
- func SetLogger(logger *Logger)
- func Sign(v ...interface{})
- func Signf(format string, v ...interface{})
- type Logger
Constants ¶
View Source
const ( ColorFormat = "\x1b[%dm%s\x1b[0m" // 普通格式 ColorFormatBold = "\x1b[%d;1m%s\x1b[0m" // 加粗格式 )
输出格式
View Source
const ( Black = 30 Red = 31 Green = 32 Yellow = 33 Blue = 34 Magenta = 35 // 品红 Cyan = 36 // 青色 White = 37 )
字体色
View Source
const ( BlackBackground = 40 RedBackground = 41 GreenBackground = 42 YellowBackground = 43 BlueBackground = 44 MagentaBackground = 45 // 品红 CyanBackground = 46 // 青色 WhiteBackground = 47 )
背景色
View Source
const ( LV_DEBUG = iota LV_INFO LV_CONFIG LV_SIGN LV_ERROR LV_FATAL )
View Source
const ( SIGN_DEBUG = "[debug ] " SIGN_INFO = "[info ] " SIGN_CONFIG = "[config] " SIGN = "[sign ] " SIGN_ERROR = "[error ] " SIGN_FATAL = "[fatal ] " )
View Source
const LOG_PREFIX = "LOGGER "
View Source
const LOG_SIGN = ">>> "
Variables ¶
This section is empty.
Functions ¶
func GetColorize ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.