Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ const configureGatewayServer = () => {
// Register routes on both servers
const registerRoutes = async (app: FastifyInstance) => {
// Register system routes
app.register(configRoutes, { prefix: '/config' });
app.register(configRoutes, { prefix: '/config', logLevel: 'silent' });

// Register wallet routes
app.register(walletRoutes, { prefix: '/wallet' });
Expand Down Expand Up @@ -292,7 +292,7 @@ const configureGatewayServer = () => {
});

// Health check route (outside registerRoutes, only on main server)
server.get('/', async () => {
server.get('/', { logLevel: 'silent' }, async () => {
return { status: 'ok' };
});

Expand Down
2 changes: 1 addition & 1 deletion src/services/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const getLogPath = () => {

const allLogsFileTransport = new DailyRotateFile({
level: ConfigManagerV2.getInstance().get('server.logLevel') || 'info',
filename: `${getLogPath()}/logs_gateway_app.log.%DATE%`,
filename: `${getLogPath()}/${ConfigManagerV2.getInstance().get('server.logFilenameFormat') || 'logs_gateway_app.log.%DATE%'}`,
datePattern: 'YYYY-MM-DD',
handleExceptions: true,
handleRejections: true,
Expand Down
1 change: 1 addition & 0 deletions src/templates/namespace/server-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"properties": {
"certificatePath": { "type": "string" },
"logPath": { "type": "string" },
"logFilenameFormat": { "type": "string" },
"port": { "type": "integer" },
"docsPort": { "type": "integer" },
"ipWhitelist": { "type": "array" },
Expand Down
4 changes: 4 additions & 0 deletions src/templates/server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ fastifyLogs: false
# Log level for the application (debug, info, warn, error)
logLevel: debug


# Format of the log filename. %DATE% will be replaced with the current date.
# Recommend changing to logs_gateway_app.%DATE%.log to allow editors to identify the file for syntax highlighting.
logFilenameFormat: logs_gateway_app.log.%DATE%
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,5 @@
"fastifyLogs": { "type": "boolean" }
},
"additionalProperties": false,
"required": [
"port",
"certificatePath",
"logPath"
]
"required": ["port", "certificatePath", "logPath"]
}