Merge pull request #312 from stevvooe/add-layer-info-cache
registry: integrate layer info cache with registry and storage
This commit is contained in:
commit
1963b7902e
42 changed files with 5442 additions and 28 deletions
|
@ -44,6 +44,20 @@ func WithLogger(ctx Context, logger Logger) Context {
|
|||
return WithValue(ctx, "logger", logger)
|
||||
}
|
||||
|
||||
// GetLoggerWithField returns a logger instance with the specified field key
|
||||
// and value without affecting the context. Extra specified keys will be
|
||||
// resolved from the context.
|
||||
func GetLoggerWithField(ctx context.Context, key, value interface{}, keys ...interface{}) Logger {
|
||||
return getLogrusLogger(ctx, keys...).WithField(fmt.Sprint(key), value)
|
||||
}
|
||||
|
||||
// GetLoggerWithFields returns a logger instance with the specified fields
|
||||
// without affecting the context. Extra specified keys will be resolved from
|
||||
// the context.
|
||||
func GetLoggerWithFields(ctx context.Context, fields map[string]interface{}, keys ...interface{}) Logger {
|
||||
return getLogrusLogger(ctx, keys...).WithFields(logrus.Fields(fields))
|
||||
}
|
||||
|
||||
// GetLogger returns the logger from the current context, if present. If one
|
||||
// or more keys are provided, they will be resolved on the context and
|
||||
// included in the logger. While context.Value takes an interface, any key
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue