Skip to content

Commit 89c930e

Browse files
authored
Merge pull request #4 from golang/master
glog: populate symlinks -log_link directory (golang#64)
2 parents 773c31a + 6b9d7f7 commit 89c930e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

glog_file.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ func create(tag string, t time.Time) (f *os.File, filename string, err error) {
132132
symlink := filepath.Join(dir, link)
133133
os.Remove(symlink) // ignore err
134134
os.Symlink(name, symlink) // ignore err
135+
if *logLink != "" {
136+
lsymlink := filepath.Join(*logLink, link)
137+
os.Remove(lsymlink) // ignore err
138+
os.Symlink(fname, lsymlink) // ignore err
139+
}
135140
return f, fname, nil
136141
}
137142
lastErr = err

0 commit comments

Comments
 (0)