// Close closes and cancels all watchers that might be active.
Close closes and cancels all watchers that might be active.
// Close closes and cancels all watchers that might be active .
func (cl *Logger) Close() error {
	log.Info("closing...")
	defer log.Info("closed")
	cl.lock.Lock()
	defer cl.lock.Unlock()
	if cl.closed {
		return nil
	}
	cl.closed = true
	for _, w := range cl.watchers {
		close(w)
	}
	return nil
}
func ( cl * Logger ) Close ( ) error { log . Info ( " " ) defer log . Info ( " " ) cl . lock . Lock ( ) defer cl . lock . Unlock ( ) if cl . closed { return nil } cl . closed = true for _ , w := range cl . watchers { close ( w ) } return nil }
Close closes and cancels all watchers that might be active.
Close closes and cancels all watchers that might be active .