mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 09:14:27 +08:00
file log path supports relative path
This commit is contained in:
+1
-1
@@ -29,7 +29,7 @@ COPY docker/docker-entrypoint.sh /docker-entrypoint.sh
|
|||||||
RUN chmod +x /docker-entrypoint.sh
|
RUN chmod +x /docker-entrypoint.sh
|
||||||
RUN mkdir -p /usr/local/bin/ezbookkeeping && chown 1000:1000 /usr/local/bin/ezbookkeeping \
|
RUN mkdir -p /usr/local/bin/ezbookkeeping && chown 1000:1000 /usr/local/bin/ezbookkeeping \
|
||||||
&& mkdir -p /usr/local/bin/ezbookkeeping/data && chown 1000:1000 /usr/local/bin/ezbookkeeping/data \
|
&& mkdir -p /usr/local/bin/ezbookkeeping/data && chown 1000:1000 /usr/local/bin/ezbookkeeping/data \
|
||||||
&& mkdir -p /var/log/ezbookkeeping && chown 1000:1000 /var/log/ezbookkeeping
|
&& mkdir -p /usr/local/bin/ezbookkeeping/log && chown 1000:1000 /usr/local/bin/ezbookkeeping/log
|
||||||
WORKDIR /usr/local/bin/ezbookkeeping
|
WORKDIR /usr/local/bin/ezbookkeeping
|
||||||
COPY --from=be-builder --chown=1000:1000 /go/src/github.com/mayswind/ezbookkeeping/ezbookkeeping /usr/local/bin/ezbookkeeping/ezbookkeeping
|
COPY --from=be-builder --chown=1000:1000 /go/src/github.com/mayswind/ezbookkeeping/ezbookkeeping /usr/local/bin/ezbookkeeping/ezbookkeeping
|
||||||
COPY --from=fe-builder --chown=1000:1000 /go/src/github.com/mayswind/ezbookkeeping/dist /usr/local/bin/ezbookkeeping/public
|
COPY --from=fe-builder --chown=1000:1000 /go/src/github.com/mayswind/ezbookkeeping/dist /usr/local/bin/ezbookkeeping/public
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ mode = console file
|
|||||||
level = info
|
level = info
|
||||||
|
|
||||||
# For "file" only, absolute path of log file
|
# For "file" only, absolute path of log file
|
||||||
log_path = /var/log/ezbookkeeping/ezbookkeeping.log
|
log_path = log/ezbookkeeping.log
|
||||||
|
|
||||||
[uuid]
|
[uuid]
|
||||||
# Uuid generator type, supports "internal" currently
|
# Uuid generator type, supports "internal" currently
|
||||||
|
|||||||
@@ -368,7 +368,9 @@ func loadLogConfiguration(config *Config, configFile *ini.File, sectionName stri
|
|||||||
config.LogLevel = getLogLevel(getConfigItemStringValue(configFile, sectionName, "level"), defaultLoglevel)
|
config.LogLevel = getLogLevel(getConfigItemStringValue(configFile, sectionName, "level"), defaultLoglevel)
|
||||||
|
|
||||||
if config.EnableFileLog {
|
if config.EnableFileLog {
|
||||||
config.FileLogPath = getConfigItemStringValue(configFile, sectionName, "log_path")
|
fileLogPath := getConfigItemStringValue(configFile, sectionName, "log_path")
|
||||||
|
finalFileLogPath, _ := getFinalPath(config.WorkingPath, fileLogPath)
|
||||||
|
config.FileLogPath = finalFileLogPath
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user