code: func (s *Logging) SetFormat(format string) error {
  	s.mutex.Lock()
  	defer s.mutex.Unlock()
  	if format == "" {
  		format = defaultFormat
  	}
  
  	if format == "json" {
  		s.encoding = JSON
  		return nil
  	}
  
  	if format == "logfmt" {
  		s.encoding = LOGFMT
  		return nil
  	}
  
  	formatters, err := fabenc.ParseFormat(format)
  	if err != nil {
  		return err
  	}
  	s.multiFormatter.SetFormatters(formatters)
  	s.encoding = CONSOLE
  
  	return nil
  }
docs: // SetFormat updates how log records are formatted and encoded. Log entries
  // created after this method has completed will use the new format.
  //
  // An error is returned if the log format specification cannot be parsed.