Documentation
¶
Index ¶
- Constants
- func Close() error
- func ConvertLogLevelToHexa(value string) string
- func Debug(v ...interface{})
- func Error(v ...interface{})
- func Info(v ...interface{})
- func Initialize(pref preference)
- func IsDebugEnabled() bool
- func IsErrorEnabled() bool
- func IsInfoEnabled() bool
- func IsTraceEnabled() bool
- func IsWarnEnabled() bool
- func NewCustomLogger(loglevel string) customLogger
- func NewPreference(logFolder string) preference
- func NewPreferenceWithProcName(logFolder string, procName string) preference
- func SentryInit()
- func SetFileSizeLimitMB(mb uint16)
- func SetKeepingFileDays(days uint16)
- func SetLevel(level LogLevel)
- func SetSentryDsn(dsn string, tags map[string]string)
- func SetSentryFlushSecond(second int)
- func SetSentryLogLevel(logLevel string)
- func SetShowMethod(newValue bool)
- func SetSourcePrintSize(newValue uint8)
- func Trace(v ...interface{})
- func Warn(v ...interface{})
- type ErrorTraceLogEvent
- type GeneralLogEvent
- type LogDeliveryMode
- type LogEvent
- type LogLevel
- type LogStreamMode
- type TracePoint
Constants ¶
View Source
const ( LOGGING_STATUS_NOT_STARTED = 1 << iota LOGGING_STATUS_RUNNING LOGGING_STATUS_SHUTDOWN )
logging status
View Source
const ( LOG_NONE = 0x0 // 0000 0000 LOG_ERROR = 0x7 // 0000 0111 LOG_WARN = 0xF // 0000 1111 LOG_INFO = 0x1F // 0001 1111 LOG_DEBUG = 0x2F // 0010 1111 LOG_TRACE = 0xFF // 1111 1111 )
log levels
View Source
const ( DEFAULT_KEEPING_FILE_DAYS = 90 DEFAULT_SOURCE_PRINT_SIZE = 30 DEFAULT_ERROR_TRACE_LEVEL = 10 DEFAULT_SENTRY_FLUSH_SECOND = 2 )
logging preference default values
View Source
const ( DELIVERY_MODE_SYNC = 1 << iota DELIVERY_MODE_ASYNC )
logging preference delivery mode
View Source
const ( STREAM_MODE_STDOUT = 1 << iota STREAM_MODE_FILE )
View Source
const ( TIME_YYYYMMDD = "2006-01-02" Hertz = 100 // general linux CLK_TCK )
Variables ¶
This section is empty.
Functions ¶
func ConvertLogLevelToHexa ¶
func Initialize ¶
func Initialize(pref preference)
func IsDebugEnabled ¶
func IsDebugEnabled() bool
func IsErrorEnabled ¶
func IsErrorEnabled() bool
func IsInfoEnabled ¶
func IsInfoEnabled() bool
func IsTraceEnabled ¶
func IsTraceEnabled() bool
func IsWarnEnabled ¶
func IsWarnEnabled() bool
func NewCustomLogger ¶
func NewCustomLogger(loglevel string) customLogger
func NewPreference ¶
func NewPreference(logFolder string) preference
func SentryInit ¶
func SentryInit()
func SetFileSizeLimitMB ¶
func SetFileSizeLimitMB(mb uint16)
func SetKeepingFileDays ¶
func SetKeepingFileDays(days uint16)
func SetSentryDsn ¶
func SetSentryFlushSecond ¶
func SetSentryFlushSecond(second int)
func SetSentryLogLevel ¶
func SetSentryLogLevel(logLevel string)
func SetShowMethod ¶
func SetShowMethod(newValue bool)
func SetSourcePrintSize ¶
func SetSourcePrintSize(newValue uint8)
Types ¶
type ErrorTraceLogEvent ¶
type ErrorTraceLogEvent struct {
GeneralLogEvent
// contains filtered or unexported fields
}
type GeneralLogEvent ¶
type GeneralLogEvent struct {
// contains filtered or unexported fields
}
type LogDeliveryMode ¶
type LogDeliveryMode uint8
type LogLevel ¶
type LogLevel uint8
log levelStr type
func ConvertHexaToLogLevel ¶
func ConvertStringToLogLevel ¶
type LogStreamMode ¶
type LogStreamMode uint8
type TracePoint ¶
type TracePoint struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.