Documentation ¶
Overview ¶
file.go
fileWriter
timewriter.go
option.go
Index ¶
- func Compress(src, dst string, isDelSrc bool) (err error)
- func Pwd() string
- type FileWriter
- func (fw *FileWriter) Close() error
- func (fw *FileWriter) Debug(msg JSONP) (int, error)
- func (fw *FileWriter) Error(msg JSONP) (int, error)
- func (fw *FileWriter) Fatal(msg JSONP)
- func (fw *FileWriter) Info(msg JSONP) (int, error)
- func (fw *FileWriter) Log(level LogLevel, msg JSONP) (int, error)
- func (fw *FileWriter) Msg(msg string) (int, error)
- func (fw *FileWriter) Panic(msg JSONP)
- func (fw *FileWriter) SetLevel(level LogLevel)
- func (fw *FileWriter) Warn(msg JSONP) (int, error)
- func (fw *FileWriter) Write(p []byte) (int, error)
- type JSONP
- type LogLevel
- type LogWriter
- type OptionFileFN
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileWriter ¶
type FileWriter struct {
// contains filtered or unexported fields
}
func (*FileWriter) Close ¶
func (fw *FileWriter) Close() error
func (*FileWriter) Fatal ¶
func (fw *FileWriter) Fatal(msg JSONP)
func (*FileWriter) Panic ¶
func (fw *FileWriter) Panic(msg JSONP)
func (*FileWriter) SetLevel ¶
func (fw *FileWriter) SetLevel(level LogLevel)
type LogWriter ¶
type LogWriter interface { Write(p []byte) (int, error) Close() error Msg(string) (int, error) Info(msg JSONP) (int, error) Debug(msg JSONP) (int, error) Warn(msg JSONP) (int, error) Error(msg JSONP) (int, error) Log(level LogLevel, msg JSONP) (int, error) Fatal(msg JSONP) Panic(msg JSONP) SetLevel(level LogLevel) }
func GetDefaultLogger ¶
func GetDefaultLogger() LogWriter
func NewLogFile ¶
func NewLogFile(optinos ...OptionFileFN) LogWriter
type OptionFileFN ¶
type OptionFileFN func(*FileWriter)
func WithLevel ¶
func WithLevel(level LogLevel) OptionFileFN
func WithMaxBackups ¶
func WithMaxBackups(backups int) OptionFileFN
func WithMaxSize ¶
func WithMaxSize(sizeMB int) OptionFileFN
func WithPath ¶
func WithPath(path string) OptionFileFN
func WithPreName ¶
func WithPreName(name string) OptionFileFN
func WithSplitBySize ¶
func WithSplitBySize() OptionFileFN
Click to show internal directories.
Click to hide internal directories.