This commit is contained in:
Luiz Silva 2025-02-24 10:24:54 -03:00
parent 25273beaed
commit d1a7a364bd

View file

@ -40,7 +40,7 @@ type tipoLog = {
}
export const logger =
({ app, eProducao }: { app: string; eProducao: boolean }) =>
({ app: app_e, eProducao }: { app: string; eProducao: boolean }) =>
({ inquilino, usuario }: tipoOpSessao) =>
async (
level: tipoLevel,
@ -49,9 +49,8 @@ export const logger =
): Promise<[objeto: object, erro?: string]> => {
let { __filename, detalhes, local } = op_tipoLog || {}
if (!eProducao) {
app = `DEV-${app}`
}
const app = `${eProducao ? '' : 'DEV-'}${app_e}`
if (cwd && __filename) {
__filename = __filename.replace(cwd, "")