Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // G is a shorcut for GetLogger G = GetLogger // S is a shortcut for GetSugaredLogger S = GetSugaredLogger // TraceBitLevelEnabler controls enabled log level for requests with TraceBit // It's set to DebugLevel by default TraceBitLevelEnabler = zap.NewAtomicLevel() )
Functions ¶
func GetLogger ¶
GetLogger either returns an attached Logger from the context or global logger if nothing is attached
func GetSugaredLogger ¶
func GetSugaredLogger(ctx context.Context) *zap.SugaredLogger
GetSugaredLogger either returns an attached SugaredLogger from the context or global sugared logger if nothing is attached
func WithLogger ¶
WithLogger attaches logger to a given context. Later the logger can be obtained by GetLogger
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.