func (b *Base) AddLogger(logger Logger) error {
	if b.IsInitialized() && !logger.IsInitialized() {
		err := logger.InitLogger()
		if err != nil {
			return err
		}
	} else if !b.IsInitialized() && logger.IsInitialized() {
		err := logger.ShutdownLogger()
		if err != nil {
			return err
		}
	}
	b.loggers = append(b.loggers, logger)

	if hook, ok := logger.(HookPreQueue); ok {
		b.hookPreQueue = append(b.hookPreQueue, hook)
	}

	logger.SetBase(b)
	return nil
}
func (b *Base) AddLogger(logger Logger) error {
	if b.IsInitialized() && !logger.IsInitialized() {
		err := logger.InitLogger()
		if err != nil {
			return err
		}
	} else if !b.IsInitialized() && logger.IsInitialized() {
		err := logger.ShutdownLogger()
		if err != nil {
			return err
		}
	}
	b.loggers = append(b.loggers, logger)

	if hook, ok := logger.(HookPreQueue); ok {
		b.hookPreQueue = append(b.hookPreQueue, hook)
	}

	logger.SetBase(b)
	return nil
}
func ( b * Base ) AddLogger ( logger Logger ) error { if b . IsInitialized ( ) && ! logger . IsInitialized ( ) { err := logger . InitLogger ( ) if err != nil { return err } } else if ! b . IsInitialized ( ) && logger . IsInitialized ( ) { err := logger . ShutdownLogger ( ) if err != nil { return err } } b . loggers = append ( b . loggers , logger ) if hook , ok := logger . ( HookPreQueue ) ; ok { b . hookPreQueue = append ( b . hookPreQueue , hook ) } logger . SetBase ( b ) return nil }
// AddLogger adds a new logger instance to the Base
AddLogger adds a new logger instance to the Base