code: func (s *Logging) SetWriter(w io.Writer) {
  	var sw zapcore.WriteSyncer
  	switch t := w.(type) {
  	case *os.File:
  		sw = zapcore.Lock(t)
  	case zapcore.WriteSyncer:
  		sw = t
  	default:
  		sw = zapcore.AddSync(w)
  	}
  
  	s.mutex.Lock()
  	s.writer = sw
  	s.mutex.Unlock()
  }
docs: // SetWriter controls which writer formatted log records are written to.
  // Writers, with the exception of an *os.File, need to be safe for concurrent
  // use by multiple go routines.