package log
import "github.com/containerd/containerd/log"
Index ¶
- Constants
- Variables
- func GetLogger(ctx context.Context) *logrus.Entry
- func WithLogger(ctx context.Context, logger *logrus.Entry) context.Context
Constants ¶
const RFC3339NanoFixed = "2006-01-02T15:04:05.000000000Z07:00"
RFC3339NanoFixed is time.RFC3339Nano with nanoseconds padded using zeros to ensure the formatted time is always the same number of characters.
Variables ¶
var ( // G is an alias for GetLogger. // // We may want to define this locally to a package to get package tagged log // messages. G = GetLogger // L is an alias for the standard logger. L = logrus.NewEntry(logrus.StandardLogger()) )
Functions ¶
func GetLogger ¶
GetLogger retrieves the current logger from the context. If no logger is available, the default logger is returned.
func WithLogger ¶
WithLogger returns a new context with the provided logger. Use in combination with logger.WithField(s) for great effect.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
log/logtest |
- Version
- v1.4.2
- Published
- Nov 26, 2020
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 3 minutes ago –
Tools for package owners.