mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 14:38:49 +00:00
feat: add pushing logs to loki
This commit is contained in:
1 parent
3899cbe9c0
commit
9c1ab820da
4 files changed
+410
-93
No files matched your search
@@ -42,6 +42,24 @@ const targets = [
|
||||
}
|
||||
];
|
||||
|
||||
if (process.env.LOKI_AUTH_PASSWORD && process.env.LOKI_AUTH_USERNAME) {
|
||||
targets.push({
|
||||
target: 'pino-loki',
|
||||
level: loggerOptions.minimumLogLevel,
|
||||
options: {
|
||||
sync: false,
|
||||
batching: false,
|
||||
interval: 5,
|
||||
|
||||
host: 'https://logs-prod-025.grafana.net',
|
||||
basicAuth: {
|
||||
username: process.env.LOKI_AUTH_USERNAME || '',
|
||||
password: process.env.LOKI_AUTH_PASSWORD || ''
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const transport = pino.transport({ targets });
|
||||
|
||||
const logLevelConfig = {
|
||||
|
||||
Reference in new issue
Block a user