mirror of
https://github.com/PretendoNetwork/account.git
synced 2026-09-30 22:28:00 -05:00
Make logger path configurable
This commit is contained in:
@@ -72,6 +72,7 @@ function configure() {
|
||||
logger.info('Loading config from environment variable');
|
||||
|
||||
config = {
|
||||
logger_path: process.env.PN_ACT_LOGGER_PATH,
|
||||
http: {
|
||||
port: Number(process.env.PN_ACT_CONFIG_HTTP_PORT)
|
||||
},
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
const fs = require('fs-extra');
|
||||
require('colors');
|
||||
|
||||
const root = __dirname;
|
||||
const { config } = require('./config-manager');
|
||||
|
||||
const root = config.logger_path ? config.logger_path : `${__dirname}/..`;
|
||||
fs.ensureDirSync(`${root}/logs`);
|
||||
|
||||
const streams = {
|
||||
|
||||
Reference in New Issue
Block a user