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