최신 로그 파일의 심볼릭 링크 생성
This commit is contained in:
@ -242,6 +242,9 @@ func (hc *houstonClient) launch(meta *procmeta) error {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exef, _ := os.Executable()
|
||||||
|
os.Symlink(path.Base(targetFile.Name()), path.Join(path.Dir(exef), path.Dir(logFileName), meta.name+".log"))
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
if targetFile != nil {
|
if targetFile != nil {
|
||||||
targetFile.Close()
|
targetFile.Close()
|
||||||
@ -274,6 +277,7 @@ func (hc *houstonClient) launch(meta *procmeta) error {
|
|||||||
} else {
|
} else {
|
||||||
targetFile.Close()
|
targetFile.Close()
|
||||||
targetFile = nextTargetFile
|
targetFile = nextTargetFile
|
||||||
|
os.Symlink(path.Base(targetFile.Name()), path.Join(path.Dir(exef), path.Dir(logFileName), meta.name+".log"))
|
||||||
thisFileSize = 0
|
thisFileSize = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user