chore: update .env.example and logger.js for improved configuration and logging level management
This commit is contained in:
parent
5c5574c06e
commit
68a3f4fb58
15
.env.example
15
.env.example
@ -1,4 +1,17 @@
|
|||||||
|
# Discord Bot Token
|
||||||
DISCORD_TOKEN=your_token_here
|
DISCORD_TOKEN=your_token_here
|
||||||
LAVALINK_HOST=127.0.0.1
|
|
||||||
|
# Discord Application Client ID (for command deployment)
|
||||||
|
CLIENT_ID=your_client_id_here
|
||||||
|
|
||||||
|
# Discord Guild ID (optional, for deploying commands to a specific test server)
|
||||||
|
# GUILD_ID=your_guild_id_here
|
||||||
|
|
||||||
|
# Lavalink Configuration
|
||||||
|
# Use 'lavalink' if running via docker-compose, '127.0.0.1' or 'localhost' if running Lavalink directly
|
||||||
|
LAVALINK_HOST=lavalink
|
||||||
LAVALINK_PORT=2333
|
LAVALINK_PORT=2333
|
||||||
LAVALINK_PASSWORD=your_password_here
|
LAVALINK_PASSWORD=your_password_here
|
||||||
|
|
||||||
|
# Logging Level (e.g., debug, info, warn, error)
|
||||||
|
LOG_LEVEL=info
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
const winston = require('winston');
|
const winston = require('winston');
|
||||||
|
|
||||||
const logger = winston.createLogger({
|
const logger = winston.createLogger({
|
||||||
level: 'info',
|
level: process.env.LOG_LEVEL || 'info', // Use LOG_LEVEL from env or default to 'info'
|
||||||
format: winston.format.combine(
|
format: winston.format.combine(
|
||||||
winston.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss' }),
|
winston.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss' }),
|
||||||
winston.format.printf(info => `${info.timestamp} ${info.level.toUpperCase()}: ${info.message}`)
|
winston.format.printf(info => `${info.timestamp} ${info.level.toUpperCase()}: ${info.message}`)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user