package
0.0.0-20210902034828-42829d4bdecd
Repository: https://github.com/baidu/go-lib.git
Documentation: pkg.go.dev

# README

Please see http://log4go.googlecode.com/

Installation:

  • Run goinstall log4go.googlecode.com/hg

Usage:

  • Add the following import: import l4g "log4go.googlecode.com/hg"

Acknowledgements:

  • pomack For providing awesome patches to bring log4go up to the latest Go spec

# Functions

Wrapper for (*Logger).AddFilter.
Wrapper for (*Logger).Close (closes and removes all logwriters).
No description provided by the author
Logs the given message and crashes the program.
Utility for critical log messages (returns an error for easy function returns) (see Debug() for parameter explanation) These functions will execute a closure exactly once, to build the error message for the return Wrapper for (*Logger).Critical.
Utility for debug log messages When given a string as the first argument, this behaves like Logf but with the DEBUG log level (e.g.
Utility for error log messages (returns an error for easy function returns) (see Debug() for parameter explanation) These functions will execute a closure exactly once, to build the error message for the return Wrapper for (*Logger).Error.
Compatibility with `log`.
Compatibility with `log`.
Utility for fine log messages (see Debug() for parameter explanation) Wrapper for (*Logger).Fine.
Utility for finest log messages (see Debug() for parameter explanation) Wrapper for (*Logger).Finest.
Known format codes: %T - Time (15:04:05 MST) %t - Time (15:04) %D - Date (2006/01/02) %d - Date (01/02/06) %L - Level (FNST, FINE, DEBG, TRAC, WARN, EROR, CRIT) %P - Pid of process %S - Source %M - Message Ignores unknown formats Recommended: "[%D %T] [%L] (%S) %M".
get state of log4go.
Utility for info log messages (see Debug() for parameter explanation) Wrapper for (*Logger).Info.
Wrapper for (*Logger).LoadConfiguration.
Send a log message manually Wrapper for (*Logger).Log.
Send a closure log message Wrapper for (*Logger).Logc.
Send a formatted log message easily Wrapper for (*Logger).Logf.
NewBuffer gets proper []byte from pool if size > 16K, return ErrTooLarge.
Create a new logger with a "stdout" filter configured to send log messages at or above lvl to standard output.
This creates a new ConsoleLogWriter.
Create a new logger with a "stdout" filter configured to send log messages at or above lvl to standard output.
NewFileLogWriter creates a new LogWriter which writes to the given file and has rotation enabled if rotate is true.
This creates a new FormatLogWriter.
Create a new logger.
No description provided by the author
No description provided by the author
NewTimeFileLogWriter creates a new TimeFileLogWriter PARAMS: - fname: name of log file - when: "M", minute "H", hour "D", day "MIDNIGHT", roll over at midnight "NEXTHOUR", roll over at sharp next hour - backupCount: If backupCount is > 0, when rollover is done, no more than backupCount files are kept - the oldest ones are deleted.
NewXMLLogWriter is a utility method for creating a FileLogWriter set up to output XML record log messages instead of line-based ones.
set LogBufferLength (default is 1024) This should be invoked before create logWriter.
set LogFormat(default is FORMAT_DEFAULT) This should be invoked before create logWriter.
set LogWithBlocking (default is true) This should be invoked before create logWriter.
set Src line for binary log.
set WithModuleState (default is false) This should be invoked before create logWriter.
Compatibility with `log`.
Compatibility with `log`.
Compatibility with `log`.
Compatibility with `log`.
Utility for trace log messages (see Debug() for parameter explanation) Wrapper for (*Logger).Trace.
Utility for warn log messages (returns an error for easy function returns) (see Debug() for parameter explanation) These functions will execute a closure exactly once, to build the error message for the return Wrapper for (*Logger).Warn.
WhenIsValid checks whether value of when is valid.

# Constants

file suffix when enable compress for log */.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Version information.
Version information.
Version information.
Version information.
number of seconds in a day */.
number of seconds in a hour */.
file regular suffix when enable compress for log */.
No description provided by the author
No description provided by the author

# Variables

whether record src for binary log.
No description provided by the author
No description provided by the author
No description provided by the author
LogBufferLength specifies how many log messages a particular log4go logger can buffer at a time before writing them.
log format.
process id.
whether blocking, if log buffer is full.
whether record state.

# Structs

This log writer sends output to a file.
A Filter represents the log LevelType below which no log records are written to the associated LogWriter.
***** LogCloser ******/.
A LogRecord contains all of the pertinent information for each message.
packet connection.
PacketWriter sends output to a packet connection.
This log writer sends output to a file.

# Interfaces

This is an interface for anything that should be able to write logs.
this interface provide writer's extend information.

# Type aliases

These are the integer logging levels used by the logger.
A Logger represents a collection of Filters through which log messages are written.
collect info about all writers.