package
module
Version:
v0.0.0-...-75d7814
Opens a new window with list of versions in this module.
Published: Jun 24, 2020
License: Apache-2.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package log CopyRight:2020
作者:执着是因为无知
-
func Close()
-
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 GetAppName() string
-
func GetCount() int
-
func GetLevel() string
-
func GetLogDir() string
-
func GetNodeName() string
-
func GetSize() int64
-
func Info(v ...interface{})
-
func Infof(format string, v ...interface{})
-
func SetAppName(appName string)
-
func SetCount(count int)
-
func SetLevel(level XLogLevel)
-
func SetLogDir(dir string)
-
func SetLogToFile(appName string, nodeName string, dir string, size int64, count int, ...)
-
func SetNodeName(nodeName string)
-
func SetSize(size int64)
-
func Trace(v ...interface{})
-
func Tracef(format string, v ...interface{})
-
func Warn(v ...interface{})
-
func Warnf(format string, v ...interface{})
-
type XLog
-
type XLogLevel
func Debug(v ...interface{})
Debug 记录 DEBUG 级别的日志
func Debugf(format string, v ...interface{})
Debugf 记录 DEBUG 级别的日志
func Error(v ...interface{})
Error 记录 ERROR 级别的日志
func Errorf(format string, v ...interface{})
Errorf 记录 ERROR 级别的日志
func Fatal(v ...interface{})
Fatal 记录 FATAL 级别的日志,记录完成后程序会退出
func Fatalf(format string, v ...interface{})
Fatalf 记录 FATAL 级别的日志,记录完成后程序会退出
GetSize 返回单个日志文件最大尺寸,单位 M
func Info(v ...interface{})
Info 记录 INFO 级别的日志
func Infof(format string, v ...interface{})
Infof 记录 INFO 级别的日志
func SetAppName(appName string)
SetAppName 设置应用标识
func SetNodeName(nodeName string)
SetNodeName 设置节点标识
SetSize 设置单个日志文件最大尺寸,单位 M
func Trace(v ...interface{})
Trace 记录 TRACE 级别的日志
func Tracef(format string, v ...interface{})
Tracef 记录 TRACE 级别的日志
func Warn(v ...interface{})
Warn 记录 WARN 级别的日志
func Warnf(format string, v ...interface{})
Warnf 记录 WARN 级别的日志
XLogLevel 日志级别
ToXLogLevel 把字符串转换为 Level,默认为 TRACE
Source Files
¶
Click to show internal directories.
Click to hide internal directories.