1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-08 15:00:05 +00:00

fix(logs): logs location is configurable

This commit is contained in:
Saad Jutt
2022-07-16 05:07:00 +05:00
parent 92fda183f3
commit e024a92f16
5 changed files with 17 additions and 3 deletions

View File

@@ -40,7 +40,16 @@ export const setProcessVariables = async () => {
await createFolder(absPath)
process.driveLoc = getRealPath(absPath)
const { LOG_LOCATION } = process.env
const absLogsPath = getAbsolutePath(
LOG_LOCATION ?? `sasjs_root${path.sep}logs`,
process.cwd()
)
await createFolder(absLogsPath)
process.logsLoc = getRealPath(absLogsPath)
console.log('sasLoc: ', process.sasLoc)
console.log('sasDrive: ', process.driveLoc)
console.log('sasLogs: ', process.logsLoc)
console.log('runTimes: ', process.runTimes)
}