code: func (l *LogFile) Write(b []byte) (n int, err error) {
  	// Filter out log entries that do not match log level criteria
  	if !l.logFilter.Check(b) {
  		return 0, nil
  	}
  
  	l.acquire.Lock()
  	defer l.acquire.Unlock()
  	//Create a new file if we have no file to write to
  	if l.FileInfo == nil {
  		if err := l.openNew(); err != nil {
  			return 0, err
  		}
  	}
  	// Check for the last contact and rotate if necessary
  	if err := l.rotate(); err != nil {
  		return 0, err
  	}
  	l.BytesWritten += int64(len(b))
  	return l.FileInfo.Write(b)
  }
docs: // Write is used to implement io.Writer