fix: error logs are too verbose

There were some extra logs when an error triggers an alarm that don't
need to be there.
This commit is contained in:
KernelDeimos
2025-10-16 17:12:33 -04:00
committed by Eric Dubé
parent 294fda2433
commit dc6a931a23
2 changed files with 3 additions and 4 deletions

View File

@@ -112,7 +112,9 @@ class AlarmService extends BaseService {
* @param {object} fields - Additional information about the alarm.
*/
create (id, message, fields) {
this.log.error(`upcoming alarm: ${id}: ${message}`);
if ( this.config.log_upcoming_alarms ) {
this.log.error(`upcoming alarm: ${id}: ${message}`);
}
let existing = false;
/**
* Method to create an alarm with the given ID, message, and fields.

View File

@@ -92,9 +92,6 @@ class ErrorService extends BaseService {
message = message ?? source?.message;
logger = logger ?? this.backupLogger;
logger.error(`Error @ ${location}: ${message}; ` + source?.stack);
if ( trace ) {
logger.error(source);
}
if ( alarm ) {
const alarm_id = `${location}:${message}`;