mirror of
https://github.com/ptarmiganlabs/butler-sos.git
synced 2025-12-19 17:58:18 -05:00
Make logging more consistent
This commit is contained in:
@@ -82,7 +82,7 @@ export async function storeEventCountInfluxDBV3() {
|
||||
|
||||
await writeToInfluxV3WithRetry(
|
||||
async () => await globals.influx.write(point.toLineProtocol(), database),
|
||||
'Log event count'
|
||||
'Log event counts'
|
||||
);
|
||||
globals.logger.debug(`EVENT COUNT INFLUXDB V3: Wrote log event data to InfluxDB v3`);
|
||||
}
|
||||
@@ -129,7 +129,7 @@ export async function storeEventCountInfluxDBV3() {
|
||||
|
||||
await writeToInfluxV3WithRetry(
|
||||
async () => await globals.influx.write(point.toLineProtocol(), database),
|
||||
'User event count'
|
||||
'User event counts'
|
||||
);
|
||||
globals.logger.debug(`EVENT COUNT INFLUXDB V3: Wrote user event data to InfluxDB v3`);
|
||||
}
|
||||
@@ -242,7 +242,7 @@ export async function storeRejectedEventCountInfluxDBV3() {
|
||||
for (const point of points) {
|
||||
await writeToInfluxV3WithRetry(
|
||||
async () => await globals.influx.write(point.toLineProtocol(), database),
|
||||
'Rejected event count'
|
||||
'Rejected event counts'
|
||||
);
|
||||
}
|
||||
globals.logger.debug(`REJECT LOG EVENT INFLUXDB V3: Wrote data to InfluxDB v3`);
|
||||
|
||||
@@ -196,7 +196,7 @@ export async function postHealthMetricsToInfluxdbV3(serverName, host, body, serv
|
||||
applyTagsToPoint3(point, serverTags);
|
||||
await writeToInfluxV3WithRetry(
|
||||
async () => await globals.influx.write(point.toLineProtocol(), database),
|
||||
'Health metrics'
|
||||
`Health metrics for ${host}`
|
||||
);
|
||||
}
|
||||
globals.logger.debug(`HEALTH METRICS V3: Wrote data to InfluxDB v3`);
|
||||
|
||||
@@ -197,7 +197,7 @@ export async function postLogEventToInfluxdbV3(msg) {
|
||||
|
||||
await writeToInfluxV3WithRetry(
|
||||
async () => await globals.influx.write(point.toLineProtocol(), database),
|
||||
'Log event'
|
||||
`Log event for ${msg.host}`
|
||||
);
|
||||
|
||||
globals.logger.debug(`LOG EVENT INFLUXDB V3: Wrote data to InfluxDB v3`);
|
||||
|
||||
@@ -102,7 +102,7 @@ export async function postUserEventToInfluxdbV3(msg) {
|
||||
// Convert point to line protocol and write directly with retry logic
|
||||
await writeToInfluxV3WithRetry(
|
||||
async () => await globals.influx.write(point.toLineProtocol(), database),
|
||||
'User event'
|
||||
`User event for ${msg.host}`
|
||||
);
|
||||
globals.logger.debug(`USER EVENT INFLUXDB V3: Wrote data to InfluxDB v3`);
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user