Documentation ¶
Overview ¶
Package logex is a logging helper library which append the context call info to logging output for locating
Index ¶
- Constants
- func Enable()
- func EnableWith(lvl log.Level, opts ...Option)
- func GetDebugMode() bool
- func GetLevel() log.Level
- func GetTraceMode() bool
- func InDebugging() bool
- func SetDebugMode(b bool)
- func SetTraceMode(b bool)
- func SetupLoggingFormat(format string, logexSkipFrames int)
- type LogCapturer
- type Option
Constants ¶
View Source
const ( // AppName const AppName = "logex" // Version const Version = "1.3.22" // VersionInt const VersionInt = 0x010316 )
View Source
const SKIP = formatter.SKIP
SKIP is a constant key Deprecated it's obsoleted
Variables ¶
This section is empty.
Functions ¶
func EnableWith ¶ added in v1.0.3
EnableWith makes logrus logging enabled. Deprecated it's obsoleted
func GetDebugMode ¶ added in v1.2.0
func GetDebugMode() bool
GetDebugMode return the debug boolean flag generally
func GetTraceMode ¶ added in v1.2.0
func GetTraceMode() bool
GetTraceMode return the trace boolean flag generally
func InDebugging ¶ added in v1.2.0
func InDebugging() bool
InDebugging check if the delve debugger presents
func SetDebugMode ¶ added in v1.2.0
func SetDebugMode(b bool)
SetDebugMode set the debug boolean flag generally
func SetTraceMode ¶ added in v1.2.0
func SetTraceMode(b bool)
SetTraceMode set the trace boolean flag generally
func SetupLoggingFormat ¶ added in v1.1.9
SetupLoggingFormat specify logrus logging configurations. Deprecated it's obsoleted
Types ¶
type LogCapturer ¶ added in v1.0.1
type LogCapturer interface {
Release()
}
LogCapturer reroutes testing.T log output
func CaptureLog ¶ added in v1.0.1
func CaptureLog(tb testing.TB) LogCapturer
CaptureLog redirects logrus output to testing.Log
Click to show internal directories.
Click to hide internal directories.