Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultLogFormatter = logging.MustStringFormatter("%{color}%{time:2006-01-02 15:04} %{shortfunc} ▶ %{level:.4s} %{id:03x}%{color:reset} %{message}") LowVerboseLogFormatter = logging.MustStringFormatter("%{time:2006-01-02 15:04} ▶ %{level:.4s} %{message}") VerboseLogFilePathFormatter = logging.MustStringFormatter("%{color}%{time:2006-01-02 15:04} %{longpkg} %{longfunc} ▶ %{level:.4s} %{id:03x}%{color:reset} %{longfile} %{message}") )
Define the standard formatter
View Source
var Now = time.Now
Now - time.Now
Functions ¶
Types ¶
type RotateFile ¶ added in v1.5.1
type RotateFile struct {
// contains filtered or unexported fields
}
RotateFile - Define a wrapper for log file
func NewRotateFile ¶ added in v1.5.1
func NewRotateFile(filename string, flag int, perm os.FileMode, autoRotate bool) (*RotateFile, error)
NewRotateFile - Return a new Logging file instance
func (*RotateFile) Rotate ¶ added in v1.5.1
func (r *RotateFile) Rotate() error
Rotate - Rotates the file
Click to show internal directories.
Click to hide internal directories.