This commit is contained in:
Nicolas
2024-09-27 12:23:45 -04:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ export async function setCachedACUC(api_key: string, acuc: AuthCreditUsageChunk
await setValue(cacheKeyACUC, JSON.stringify(acuc), 600, true); await setValue(cacheKeyACUC, JSON.stringify(acuc), 600, true);
}); });
} catch (error) { } catch (error) {
Logger.error(`Error updating cached ACUC: ${error}`); Logger.error(`Error updating cached ACUC ${cacheKeyACUC}: ${error}`);
Sentry.captureException(error); Sentry.captureException(error);
} }
} }
+1 -1
View File
@@ -19,7 +19,7 @@ export class Logger {
}; };
static log (message: string, level: LogLevel) { static log (message: string, level: LogLevel) {
const logLevel: LogLevel = LogLevel[process.env.LOGGING_LEVEL as keyof typeof LogLevel] || LogLevel.INFO; const logLevel: LogLevel = LogLevel[process.env.LOGGING_LEVEL as keyof typeof LogLevel] || LogLevel.TRACE;
const levels = [LogLevel.NONE, LogLevel.ERROR, LogLevel.WARN, LogLevel.INFO, LogLevel.DEBUG, LogLevel.TRACE]; const levels = [LogLevel.NONE, LogLevel.ERROR, LogLevel.WARN, LogLevel.INFO, LogLevel.DEBUG, LogLevel.TRACE];
const currentLevelIndex = levels.indexOf(logLevel); const currentLevelIndex = levels.indexOf(logLevel);
const messageLevelIndex = levels.indexOf(level); const messageLevelIndex = levels.indexOf(level);