func New(options ...Option) (*Logger, error) {
	l := &Logger{
		Formatter:      NewTextOutputFormatter(),
		Output:         NopCloserWriter{NewInterlockedWriter(os.Stdout)},
		RecoverPanics:  DefaultRecoverPanics,
		Flags:          NewFlags(DefaultFlags...),
		Writable:       FlagsAll(),
		Scopes:         ScopesAll(),
		WritableScopes: ScopesAll(),
	}

	l.Scope = NewScope(l)
	var err error
	for _, option := range options {
		if err = option(l); err != nil {
			return nil, err
		}
	}
	return l, nil
}
// New returns a new logger with a given set of enabled flags.
// By default it uses a text output formatter writing to stdout.
New returns a new logger with a given set of enabled flags.
By default it uses a text output formatter writing to stdout.
// New returns a new logger with a given set of enabled flags . // By default it uses a text output formatter writing to stdout .
func New(options ...Option) (*Logger, error) {
	l := &Logger{
		Formatter:      NewTextOutputFormatter(),
		Output:         NopCloserWriter{NewInterlockedWriter(os.Stdout)},
		RecoverPanics:  DefaultRecoverPanics,
		Flags:          NewFlags(DefaultFlags...),
		Writable:       FlagsAll(),
		Scopes:         ScopesAll(),
		WritableScopes: ScopesAll(),
	}
	l.Scope = NewScope(l)
	var err error
	for _, option := range options {
		if err = option(l); err != nil {
			return nil, err
		}
	}
	return l, nil
}
func New ( options ... Option ) ( * Logger , error ) { l := & Logger { Formatter : NewTextOutputFormatter ( ) , Output : NopCloserWriter { NewInterlockedWriter ( os . Stdout ) } , RecoverPanics : DefaultRecoverPanics , Flags : NewFlags ( DefaultFlags ... ) , Writable : FlagsAll ( ) , Scopes : ScopesAll ( ) , WritableScopes : ScopesAll ( ) , } l . Scope = NewScope ( l ) var err error for _ , option := range options { if err = option ( l ) ; err != nil { return nil , err } } return l , nil }
New returns a new logger with a given set of enabled flags.
New returns a new logger with a given set of enabled flags .