You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-07-17 01:52:30 +02:00
Fixup initial levels
This commit is contained in:
@ -2,35 +2,40 @@ package logger
|
|||||||
|
|
||||||
// The following constants define the various levels available to the logging
|
// The following constants define the various levels available to the logging
|
||||||
const (
|
const (
|
||||||
// Info levels for informational logs that should be logged all the time.
|
// Info levels for informational logs that should be logged all the time.
|
||||||
Info0 = 0
|
Info0 = 0
|
||||||
Info1 = Info0 +1
|
Info1 = Info0 + 1
|
||||||
Info2 = Info1 +1
|
Info2 = Info1 + 1
|
||||||
|
|
||||||
// Debug levels for debug logs that should only be logged when trying to
|
// Debug levels for debug logs that should only be logged when trying to
|
||||||
// diagnose some error
|
// diagnose some error
|
||||||
Debug0 = 3
|
Debug0 = 3
|
||||||
Debug1 = Debug0 +1
|
Debug1 = Debug0 + 1
|
||||||
Debug2 = Debug1 +1
|
Debug2 = Debug1 + 1
|
||||||
|
|
||||||
// Trace levels for trace level logging that should only be logged in extreme
|
// Trace levels for trace level logging that should only be logged in extreme
|
||||||
// circumstances. These can be used to make the logs very chatty.
|
// circumstances. These can be used to make the logs very chatty.
|
||||||
Trace0 = 6
|
Trace0 = 6
|
||||||
Trace1 = Trace0 +1
|
Trace1 = Trace0 + 1
|
||||||
Trace2 = Trace1 +1
|
Trace2 = Trace1 + 1
|
||||||
)
|
)
|
||||||
|
|
||||||
// The following constants should be used when logging in the various packages
|
// The following constants should be used when logging in the various packages
|
||||||
// throughout the codebase. We control the levels here cerntrally and then alias
|
// throughout the codebase. We control the levels here cerntrally and then alias
|
||||||
// them for use in the packages themselves.
|
// them for use in the packages themselves.
|
||||||
const (
|
const (
|
||||||
// Core levels are used in the main package.
|
// Core levels are used in the main package.
|
||||||
CoreInfo = Info0
|
CoreInfo = Info0
|
||||||
CoreDebug = Debug0
|
CoreDebug = Debug0
|
||||||
CoreTrace = Trace0
|
CoreTrace = Trace0
|
||||||
|
|
||||||
// Provider levels are used in the providers package.
|
// Provider levels are used in the providers package.
|
||||||
ProviderInfo = Info1
|
ProviderInfo = Info1
|
||||||
ProviderDebug = Debug1
|
ProviderDebug = Debug1
|
||||||
ProviderTrace = Trace1
|
ProviderTrace = Trace1
|
||||||
|
|
||||||
|
// Request levels are used in the requests package.
|
||||||
|
RequestInfo = Info2
|
||||||
|
RequestDebug = Debug2
|
||||||
|
RequestTrace = Trace2
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user