diff --git a/api/config/app.ts b/api/config/app.ts index 8bc71f73eb..30727220c3 100644 --- a/api/config/app.ts +++ b/api/config/app.ts @@ -6,7 +6,8 @@ config({ path: './.env.app' }) // config/app.js export const title: string = 'Z-Wave JS UI' export const storeDir: string = process.env.STORE_DIR || joinPath(true, 'store') -export const logsDir: string = joinPath(storeDir, 'logs') +export const logsDir: string = + process.env.ZWAVEJS_LOGS_DIR || joinPath(storeDir, 'logs') export const snippetsDir: string = joinPath(storeDir, 'snippets') export const tmpDir: string = joinPath(storeDir, '.tmp') diff --git a/api/lib/ZwaveClient.ts b/api/lib/ZwaveClient.ts index 9a41331f34..493a99994c 100644 --- a/api/lib/ZwaveClient.ts +++ b/api/lib/ZwaveClient.ts @@ -305,10 +305,7 @@ export type SensorTypeScale = { export type AllowedApis = (typeof allowedApis)[number] -const ZWAVEJS_LOG_FILE = utils.joinPath( - process.env.ZWAVEJS_LOGS_DIR || logsDir, - 'zwavejs_%DATE%.log', -) +const ZWAVEJS_LOG_FILE = utils.joinPath(logsDir, 'zwavejs_%DATE%.log') export type ZUIValueIdState = { text: string