// From extracts a logger from the supplied context, or returns a NopLogger if none is found.
From extracts a logger from the supplied context, or returns a NopLogger if none is found.
// From extracts a logger from the supplied context or returns a NopLogger if none is found .
func From(ctx context.Context) Logger {
	if ctx == nil {
		return NopLogger()
	}
	v := ctx.Value(contextKey)
	l, ok := v.(Logger)
	if !ok || l == nil {
		return NopLogger()
	}
	return l
}
func From ( ctx context . Context ) Logger { if ctx == nil { return NopLogger ( ) } v := ctx . Value ( contextKey ) l , ok := v . ( Logger ) if ! ok || l == nil { return NopLogger ( ) } return l }
From extracts a logger from the supplied context, or returns a NopLogger if none is found.
From extracts a logger from the supplied context or returns a NopLogger if none is found .