melhorias
This commit is contained in:
parent
67f215ef82
commit
38849c8a1d
5 changed files with 10 additions and 6 deletions
|
|
@ -37,6 +37,7 @@ type tipoLog = {
|
|||
detalhes?: unknown[]
|
||||
__filename?: string
|
||||
local?: string
|
||||
parametros?: { [k: string]: string }
|
||||
}
|
||||
|
||||
export const logger =
|
||||
|
|
@ -47,7 +48,7 @@ export const logger =
|
|||
mensagem: string,
|
||||
op_tipoLog?: tipoLog,
|
||||
): Promise<[objeto: object, erro?: string]> => {
|
||||
let { __filename, detalhes, local } = op_tipoLog || {}
|
||||
let { __filename, detalhes, local, parametros } = op_tipoLog || {}
|
||||
|
||||
const app = `${eProducao ? "" : "DEV-"}${app_e}`
|
||||
|
||||
|
|
@ -70,7 +71,7 @@ export const logger =
|
|||
: mensagem
|
||||
|
||||
const payload = {
|
||||
stream: { app, inquilino, usuario, level },
|
||||
stream: { app, inquilino, usuario, level, ...(parametros || {}) },
|
||||
values: [
|
||||
[
|
||||
timestamp,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue