func (l *Logger) Close() {
	l.Lock()
	defer l.Unlock()

	if l.Flags != nil {
		l.Flags.SetNone()
	}

	for _, listeners := range l.Listeners {
		for _, listener := range listeners {
			_ = listener.Stop()
		}
	}
	if closer, ok := l.Output.(io.Closer); ok {
		_ = closer.Close()
	}
	l.Listeners = nil
	l.Filters = nil
}
// Close releases shared resources for the agent.
// It will stop listeners and wait for them to complete work
// and then zero out any other resources.
Close releases shared resources for the agent.
It will stop listeners and wait for them to complete work
and then zero out any other resources.
// Close releases shared resources for the agent . // It will stop listeners and wait for them to complete work // and then zero out any other resources .
func (l *Logger) Close() {
	l.Lock()
	defer l.Unlock()
	if l.Flags != nil {
		l.Flags.SetNone()
	}
	for _, listeners := range l.Listeners {
		for _, listener := range listeners {
			_ = listener.Stop()
		}
	}
	if closer, ok := l.Output.(io.Closer); ok {
		_ = closer.Close()
	}
	l.Listeners = nil
	l.Filters = nil
}
func ( l * Logger ) Close ( ) { l . Lock ( ) defer l . Unlock ( ) if l . Flags != nil { l . Flags . SetNone ( ) } for _ , listeners := range l . Listeners { for _ , listener := range listeners { _ = listener . Stop ( ) } } if closer , ok := l . Output . ( io . Closer ) ; ok { _ = closer . Close ( ) } l . Listeners = nil l . Filters = nil }
Close releases shared resources for the agent.
Close releases shared resources for the agent .