fix: logger.ts (#288)

* fix: release.yml

* fix: S3ChannelConfigSchema type port mismatch

* chore: package.json

* fix: refactoring logs and adding pino logger for production and dev.

* fix: trusted url error due to better auth update.

* fix: logger.ts

---------

Co-authored-by: charlesgauthereau <charles.gauthereau@soluce-technologies.com>
Co-authored-by: killianlarcher <killian.larcher@soluce-technologies.com>
This commit is contained in:
Charles GTE
2026-05-17 10:41:36 +02:00
committed by GitHub
co-authored by charlesgauthereau killianlarcher
parent 2d55618898
commit ab52ef6c27
+3 -5
View File
@@ -1,9 +1,8 @@
import pino, { type Logger } from "pino";
import {env} from "@/env.mjs";
const isProd = env.NODE_ENV === "production";
const isProd = process.env.NODE_ENV === "production";
const defaultLevel = isProd ? "info" : "debug";
const level = (env.LOG_LEVEL ?? defaultLevel) as pino.Level;
const level = (process.env.LOG_LEVEL ?? defaultLevel) as pino.Level;
function getLocalTimestamp() {
const date = new Date();
@@ -22,9 +21,8 @@ function getLocalTimestamp() {
}
export const logger: Logger = pino({
level,
level: level,
base: null,
...(isProd
? {
timestamp: getLocalTimestamp,