mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 06:28:53 +00:00
feat: Added .env file, and moved some properties from config.json to .env file
This commit is contained in:
1 parent
d96b40e277
commit
cc3fd9569c
9 files changed
+50
-19
No files matched your search
+3
-3
@@ -1,5 +1,5 @@
|
||||
const pino = require('pino');
|
||||
const { minimumLogLevel, minimumLogLevelConsole } = require('../config.json');
|
||||
require('dotenv').config();
|
||||
|
||||
const transport = pino.transport({
|
||||
targets: [
|
||||
@@ -19,7 +19,7 @@ const transport = pino.transport({
|
||||
options: { destination: `./app-error.log` }
|
||||
},
|
||||
{
|
||||
level: minimumLogLevelConsole,
|
||||
level: process.env.MINIMUM_LOG_LEVEL_CONSOLE,
|
||||
target: 'pino-pretty'
|
||||
}
|
||||
]
|
||||
@@ -27,7 +27,7 @@ const transport = pino.transport({
|
||||
|
||||
module.exports = pino(
|
||||
{
|
||||
level: minimumLogLevel,
|
||||
level: process.env.MINIMUM_LOG_LEVEL,
|
||||
timestamp: () => `,"timestamp":"${new Date(Date.now()).toISOString()}"`,
|
||||
base: undefined
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user