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
|
||||
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_PASSWORD=your_password_here
|
||||
|
||||
# Logging Level (e.g., debug, info, warn, error)
|
||||
LOG_LEVEL=info
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
const winston = require('winston');
|
||||
|
||||
const logger = winston.createLogger({
|
||||
level: 'info',
|
||||
format: winston.format.combine(
|
||||
winston.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss' }),
|
||||
level: process.env.LOG_LEVEL || 'info', // Use LOG_LEVEL from env or default to 'info'
|
||||
format: winston.format.combine(
|
||||
winston.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss' }),
|
||||
winston.format.printf(info => `${info.timestamp} ${info.level.toUpperCase()}: ${info.message}`)
|
||||
),
|
||||
transports: [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user