Skip to content

Commit

Permalink
glog: populate symlinks -log_link directory (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
chressie authored Aug 9, 2023
1 parent 03ad3c2 commit 6b9d7f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions glog_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ func create(tag string, t time.Time) (f *os.File, filename string, err error) {
symlink := filepath.Join(dir, link)
os.Remove(symlink) // ignore err
os.Symlink(name, symlink) // ignore err
if *logLink != "" {
lsymlink := filepath.Join(*logLink, link)
os.Remove(lsymlink) // ignore err
os.Symlink(fname, lsymlink) // ignore err
}
return f, fname, nil
}
lastErr = err
Expand Down

0 comments on commit 6b9d7f7

Please sign in to comment.