correção em logger
This commit is contained in:
parent
58bbbec925
commit
45e634f7e2
4 changed files with 14 additions and 8 deletions
|
|
@ -85,17 +85,20 @@ export const logger: tipoLogger =
|
|||
}
|
||||
|
||||
if (local) {
|
||||
detalhes = [`${nomeVariavel({ local })}="${local}"`]
|
||||
detalhes = [`${nomeVariavel({ local })}="${local}"`, ...(detalhes || [])]
|
||||
}
|
||||
|
||||
if (__filename) {
|
||||
detalhes = [`${nomeVariavel({ __filename })}="${__filename}"`]
|
||||
detalhes = [
|
||||
`${nomeVariavel({ __filename })}="${__filename}"`,
|
||||
...(detalhes || []),
|
||||
]
|
||||
}
|
||||
|
||||
const timestamp = `${Date.now()}000000`
|
||||
|
||||
const mainLog = detalhes?.length
|
||||
? `${mensagem} | ${detalhes.map((d) => JSON.stringify(d)).join(" ")}`
|
||||
? `${mensagem} | ${detalhes.map((d) => JSON.stringify(d)).join(" | ")}`
|
||||
: mensagem
|
||||
|
||||
const payload: tipoLokiObjeto["streams"][number] = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue