Skip to content

Commit a098ea8

Browse files
committed
feat(config): adjust default log path when root path is specified
1 parent e18d2da commit a098ea8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

config/default.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ var (
175175
func initDefaultConfig() {
176176
if RootPath == "" {
177177
RootPath = DefaultRootPath
178+
} else {
179+
// 指定程序根路径时, 修正缺省日志路径
180+
DefaultLogPath = filepath.Join(RootPath, "..", "log")
178181
}
179182

180183
if LogPath == "" {

0 commit comments

Comments
 (0)