glog.go
func (l *Log) createFiles(sev Severity) error {
	now := time.Now()
	// Files are created in decreasing severity order, so as soon as we find one
	// has already been created, we can stop.
	for s := sev; s >= InfoLog && l.file[s] == nil; s-- {
		w, err := newFlushSyncWriter(l, s, now)
		if err != nil {
			return err
		}
		l.file[s] = w
	}
	return nil
}
func (l *Log) createFiles(sev Severity) error {
	now := time.Now()
	// Files are created in decreasing severity order, so as soon as we find one
	// has already been created, we can stop.
	for s := sev; s >= InfoLog && l.file[s] == nil; s-- {
		w, err := newFlushSyncWriter(l, s, now)
		if err != nil {
			return err
		}
		l.file[s] = w
	}
	return nil
}
func ( l * Log ) createFiles ( sev Severity ) error { now := time . Now ( ) // Files are created in decreasing severity order, so as soon as we find one // has already been created, we can stop. for s := sev ; s >= InfoLog && l . file [ s ] == nil ; s -- { w , err := newFlushSyncWriter ( l , s , now ) if err != nil { return err } l . file [ s ] = w } return nil }
// createFiles creates all the log files for severity from sev down to infoLog.
// l.mu is held.
createFiles creates all the log files for severity from sev down to infoLog . l . mu is held .