Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileHook ¶
type FileHook struct {
LogFolderPath string
}
FileHook is a hook for writing log in local file
func NewFileHook ¶
NewFileHook is an new method for new a file hook
func (*FileHook) GetLogFilePath ¶
GetLogFilePath is a func to get log file path
type ILogger ¶
type ILogger interface {
// WriteError is for error record
WriteError(err interface{}, trace string, param interface{})
// WriteInfo is for temp debug info
WriteInfo(param interface{})
}
ILogger define the log actions
var Logger ILogger
type LogrusLogger ¶
type LogrusLogger struct {
}
func NewLogrusLogger ¶
func NewLogrusLogger(logPath string) (*LogrusLogger, error)
NewLogrusLogger is init func for an new instance
func (*LogrusLogger) WriteError ¶
func (logger *LogrusLogger) WriteError(err interface{}, trace string, param interface{})
WriteError for error info
func (*LogrusLogger) WriteInfo ¶
func (logger *LogrusLogger) WriteInfo(param interface{})
WriteInfo for temp debug info
Click to show internal directories.
Click to hide internal directories.