Skip to content

Feature/auditoria victorialogs#54

Open
Nestor-Brasileiro wants to merge 23 commits intodevelopfrom
feature/auditoria-victorialogs
Open

Feature/auditoria victorialogs#54
Nestor-Brasileiro wants to merge 23 commits intodevelopfrom
feature/auditoria-victorialogs

Conversation

@Nestor-Brasileiro
Copy link

@Nestor-Brasileiro Nestor-Brasileiro commented Mar 10, 2026

Melhoria gerais no formato do log:

  • Foi adicionado uma propriedade estática para configuração de campos específicos a nível de aplicação.
  • Foi adicionado opções no createLogger além da tag para adição de campos customizados com escopo somente na instancia do createLogger.

Exemplo de aplicação de propriedade estática(OZMAP):

// src/Application.ts
Logger.setGlobalAttributes({
   tenant_id: config.authorization?.userID || 'N/A',
   tenant: process.env.OZMAP_DOMAIN || 'N/A'
})

Todos os logs da aplicação irão com essas propriedades.

Exemplo de aplicação de propriedades na instância do logger:

// src/db/model/0History.ts
import createLogger from '@ozmap/logger';

const logger = createLogger(__filename, { attributes: { job: 'history' } });

logger.audit(JSON.stringify({ id: 1, kind: 'a' }));

Formato de output final:

{
   "pid":91596,
   "ppid":91515,
   "tenant_id":"3efd49e8-cde1-40fa-881f-e7f3d7587a4e", 
   "tenant":"http://localhost",                                                 
   "job":"history",                                                                       
   "tag":"/home/nestor/devoz/ozmap/src/db/model/0History.ts",
   "level":"AUDIT",
   "severityText":"AUDIT",
   "severityNumber":12,
   "body":{
      "0":{
                "id": 1,
                "kind": "a"
      }
   }
}

@Nestor-Brasileiro Nestor-Brasileiro self-assigned this Mar 10, 2026
@Nestor-Brasileiro Nestor-Brasileiro added enhancement New feature or request help wanted Extra attention is needed labels Mar 10, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the JSON log payload format for @ozmap/logger by allowing both application-wide (global) attributes and per-logger-instance attributes to be included in every structured JSON log record.

Changes:

  • Bumped package version to 0.2.9-beta.
  • Added Logger.setGlobalAttributes(...) and plumbed per-instance attributes through createLogger(...) into the JSON formatter.
  • Updated JSON formatter to merge global + instance attributes into the final structured payload.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
package.json Version bump for the new logging payload capability.
lib/format/json.ts Merges global/instance attributes into JSON output structure.
lib/format/index.ts Threads attributes into the JSON formatter via getLogWrapper.
lib/Logger.ts Introduces global attributes API and createLogger instance attributes option.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

lib/Logger.ts Outdated
Comment on lines +18 to +26
static globalAttributes: Record<string, string | number>;

/**
* Global attributes to show in every log
* @param data object containing attributes, needs to be k = string, v = string
*/
static setGlobalAttributes(data: Record<string, string | number>): void {
Logger.globalAttributes = data;
}
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logger.globalAttributes is declared but never initialized. In json formatting it gets spread into the structured payload; if setGlobalAttributes() was never called, spreading undefined will throw at runtime. Initialize it to {} (or Object.create(null)) and/or guard the spread with a default empty object.

Copilot uses AI. Check for mistakes.
Comment on lines +45 to +49
tag,
level /** @deprecated Use 'severityText' instead. */,
severityText: level,
severityNumber: LogLevels[logLevelKey],
body: data
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change removes the previously emitted data field (which was marked deprecated). Even if deprecated, removing it is a breaking change for any consumers still reading it. Consider keeping data as an alias of body for one more release (or explicitly document the breaking change / bump major version).

Copilot uses AI. Check for mistakes.
Comment on lines 62 to 76
public constructor(
opts: { tag?: string; client?: AbstractLogger; noServer?: boolean } = {}
opts: {
tag?: string;
client?: AbstractLogger;
noServer?: boolean;
attributes?: LogContext['attributes'];
} = {}
) {
this.logger = getLogWrapper.call(
this,
output(),
opts.client ?? console,
opts.tag
opts.tag,
opts.attributes
);
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New behavior (global attributes + per-instance attributes passed into the JSON formatter) isn’t covered by existing tests. Consider adding a Jest test using a custom client that captures logger.log(...), then JSON.parse the payload to assert the attributes are present and that logging works when setGlobalAttributes() isn’t called.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (2)

lib/format/json.ts:102

  • The function currently returns an async log wrapper and also contains a second nested return (level, ...args) => { ... } block (duplicated wrapper) without properly closing the first one. This makes the file syntactically invalid and also violates LogWrapper (expects a sync function returning void, not a Promise). Remove the accidental nested return/async and keep a single wrapper that logs the payload built with the new attributes parameter.
	return async (level: LevelTag, ...args: unknown[]) => {
		const payload = toStructuredJsonLog.call(
			this,
			level,
			now,
			tag,
			attributes
		);
	return (level: LevelTag, ...args: unknown[]) => {
		const payload = toStructuredJsonLog.call(this, level, now, tag);

		for (const arg of args) {
			payload.push(normalize(arg));
		}

		logger.log(paint[level](payload.toString()));
	};
}

lib/Logger.ts:503

  • The createLogger JSDoc block has duplicated @param entries (tag/client/noServer repeated) and contains typos like instace. Please clean this up so the public API docs reflect the actual signature and new attributes option only once.
 * @param   tag            Tag with which the logger is being created.
 * @param   opts		   Optional attributes to add context to logger
 * @param   opts.client    Underlying abstract logger to override console.
 * @param   opts.noServer  Disable the embedded http server for runtime actions.
 * @param   opts.attributes Adds fields with static value for every log
 * @param   tag              Tag with which the logger is being created.
 * @param   opts.client      Underlying abstract logger to override console.
 * @param   opts.noServer    Disable the embedded http server for runtime actions.
 * @param   opts.allowExit   Allow process to exit naturally (uses server.unref()).
 * @param   opts.timerTTL    TTL for timers in ms (default: 10min). Set to 0 to disable cleanup.
 * @returns Logger instace
 */

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +40 to +50
const structuredData = {
...timestamp(),
...this.getContext(),
...Logger.globalAttributes,
...attributes,
tag,
level /** @deprecated Use 'severityText' instead. */,
severityText: level,
severityNumber: LogLevels[logLevelKey],
body: data
};
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New behavior adds per-instance attributes and global attributes into JSON output, but the existing JSON formatter tests don’t assert these fields. Add tests covering: (1) instance attributes passed to createLogger appear on the root of the JSON payload, and (2) Logger.setGlobalAttributes() adds fields without breaking logs when unset.

Copilot uses AI. Check for mistakes.
lib/Logger.ts Outdated
Comment on lines +28 to +36
static globalAttributes: Record<string, string | number>;

/**
* Global attributes to show in every log
* @param data object containing attributes, needs to be k = string, v = string
*/
static setGlobalAttributes(data: Record<string, string | number>): void {
Logger.globalAttributes = data;
}
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logger.globalAttributes is declared but never initialized. Since the JSON formatter spreads it into every log, this can crash at runtime unless setGlobalAttributes is called early. Initialize it to an empty object (and consider keeping the property always defined) so default usage is safe.

Copilot uses AI. Check for mistakes.
lib/Logger.ts Outdated
* @param opts.tag Tag with which the logger is being created.
* @param opts.client Underlying abstract logger to override console.
* @param opts.noServer Disable the embedded http server for runtime actions.
* @param opts.customFiels Add extra fields with fixed value.
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in the constructor JSDoc: opts.customFiels should be opts.customFields (and the code uses attributes, not customFiels). This can confuse consumers reading generated docs.

Suggested change
* @param opts.customFiels Add extra fields with fixed value.
* @param opts.attributes Additional attributes to include in the log context.

Copilot uses AI. Check for mistakes.
Nestor-Brasileiro and others added 3 commits March 12, 2026 10:29
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +85 to +89
return async (level: LevelTag, ...args: unknown[]) => {
const payload = toStructuredJsonLog.call(
this,
level,
now,
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In json(), the returned function starts as async and the block isn’t closed before the subsequent return (level...) below, which leaves a stray nested return / mismatched braces and will fail to compile. Remove the unintended extra return, and keep a single wrapper implementation (also ensure the wrapper passes attributes through when calling toStructuredJsonLog).

Copilot uses AI. Check for mistakes.
Comment on lines 93 to 95
return (level: LevelTag, ...args: unknown[]) => {
const payload = toStructuredJsonLog.call(this, level, now, tag);

Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This return (level: LevelTag, ...args) branch appears to be leftover from before the attributes change. After fixing the wrapper, make sure there is only one returned function and that it calls toStructuredJsonLog with tag and attributes (currently this call drops attributes).

Copilot uses AI. Check for mistakes.
Comment on lines +40 to +45
const structuredData = {
...timestamp(),
...this.getContext(),
...(Logger.globalAttributes ?? {}),
...(attributes ?? {}),
tag,
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

attributes are spread into structuredData without normalization. If a consumer passes a non-JSON-serializable value (e.g. BigInt/symbol) in attributes, JSON.stringify will throw; the catch block only replaces body and then stringifies again, which will still throw for the same bad attribute. Consider normalizing/sanitizing attributes (and/or Logger.globalAttributes) before spreading, or in the catch block fall back to a minimal guaranteed-serializable payload (e.g. omit attributes/context when serialization fails).

Copilot uses AI. Check for mistakes.
lib/Logger.ts Outdated
Comment on lines +31 to +32
* Global attributes to show in every log
* @param data object containing attributes, needs to be k = string, v = string
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The JSDoc for setGlobalAttributes says the values must be string, but the actual type allows string | number. Please align the doc with the public signature (and consider documenting whether attributes are merged or replaced on subsequent calls).

Suggested change
* Global attributes to show in every log
* @param data object containing attributes, needs to be k = string, v = string
* Global attributes to show in every log.
* Subsequent calls replace any previously set global attributes rather than merging them.
* @param data Object containing attributes, with string keys and values of type string or number.

Copilot uses AI. Check for mistakes.
lib/Logger.ts Outdated
Comment on lines +497 to +501
* @param tag Tag with which the logger is being created.
* @param opts Optional attributes to add context to logger
* @param opts.client Underlying abstract logger to override console.
* @param opts.noServer Disable the embedded http server for runtime actions.
* @param opts.attributes Adds fields with static value for every log
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The createLogger JSDoc has duplicated @param entries (tag, opts, opts.client, etc.) which makes the generated docs confusing. Please remove the duplicate block and keep a single, accurate parameter list (including the new opts.attributes).

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

@leandroschabarum leandroschabarum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

Ta com erro pra buildar

@Nestor-Brasileiro
Copy link
Author

Image Ta com erro pra buildar

cara, rolou um merge que cagou esse arquivo. O bot deixou um conflito dentro do arquivo ;(

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated 11 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 40 to 43
test('should throw when timer ID already exists', () => {
logger.time('duplicate');
expect(() => logger.time('duplicate')).toThrow(
'Identifier duplicate is in use'
);
expect(() => logger.time('duplicate')).not.toThrow();
});
lib/Logger.ts Outdated
Comment on lines +490 to +502
* Factory function to create tagged Logger instance.
*
* @param tag Tag with which the logger is being created.
* @param opts.client Underlying abstract logger to override console.
* @param opts.noServer Disable the embedded http server for runtime actions.
* @param opts.allowExit Allow process to exit naturally (uses server.unref()).
* @param opts.timerTTL TTL for timers in ms (default: 10min). Set to 0 to disable cleanup.
* @returns Logger instace
* @param tag Tag with which the logger is being created.
* @param opts Optional attributes to add context to logger
* @param opts.client Underlying abstract logger to override console.
* @param opts.noServer Disable the embedded http server for runtime actions.
* @param opts.attributes Adds fields with static value for every log
* @param tag Tag with which the logger is being created.
* @param opts Optional attributes to add context to logger
* @param opts.client Underlying abstract logger to override console.
* @param opts.noServer Disable the embedded http server for runtime actions.
* @param opts.attributes Adds fields with static value for every log
* @returns Logger instance
lib/Logger.ts Outdated
opts: {
client?: AbstractLogger;
noServer?: boolean;
attributes?: Record<string, string | number>;
Comment on lines 18 to 31
export function getLogWrapper<TScope extends Logger>(
this: TScope,
output: (typeof Outputs)[number],
logger: AbstractLogger,
tag?: string
tag?: string,
attributes?: LogContext['attributes']
): LogWrapper {
switch (output) {
case 'text':
return text.call(this, logger, tag);

case 'json':
return json.call(this, logger, tag);
return json.call(this, logger, tag, attributes);

Comment on lines +14 to +18
- name: install node v22
uses: actions/setup-node@v2
with:
registry-url: 'https://registry.npmjs.org'
node-version: 22
on:
push:
tags:
- '*.*.*'
Comment on lines +11 to +15
- uses: actions/checkout@v2
- name: 'cat package.json'
run: cat ./package.json
- name: install node v22
uses: actions/setup-node@v2
Comment on lines +13 to +17
- uses: actions/checkout@v2
- name: 'cat package.json'
run: cat ./package.json
- name: install node v22
uses: actions/setup-node@v2
Comment on lines +16 to +20
- name: install node v22
uses: actions/setup-node@v2
with:
registry-url: 'https://registry.npmjs.org'
node-version: 22
Comment on lines +39 to +45
toString: () => {
const structuredData = {
...timestamp(),
...this.getContext(),
...(Logger.globalAttributes ?? {}),
...(attributes ?? {}),
tag,
…JSDoc, add text attributes support, add attribute tests
@raupp
Copy link
Contributor

raupp commented Mar 14, 2026

Code Review - Correções aplicadas (commit 4da30e3)

Todos os comentários de revisão foram endereçados neste commit:

1. Tipagem inconsistente de attributes

  • Logger.globalAttributes e setGlobalAttributes() agora usam LogContext['attributes'] (Record<string, unknown>) em vez de Record<string, string | number>
  • createLogger(opts.attributes) alinhado ao mesmo tipo
  • Isso permite passar booleans, objetos e outros tipos conforme o restante do codebase

2. JSDoc duplicado em createLogger

  • Removidas entradas @param duplicadas (tag, opts, opts.client repetidos)
  • Adicionados os parâmetros faltantes: opts.allowExit e opts.timerTTL
  • Corrigido typo instaceinstance

3. Attributes ignorados no formatter de texto ✅

  • getLogWrapper agora repassa attributes para o formatter de texto
  • Novo suporte em text.ts: atributos globais + instância renderizados como key=value no output texto
  • Formato: [LEVEL] tag tenant=ozmap job=history message

4. Teste de timer com nome incorreto ✅

  • Renomeado de should throw when timer ID already exists para should warn and overwrite when timer ID already exists
  • Adicionadas assertions que verificam: warning emitido, mensagem contém o ID duplicado

5. Testes de cobertura para attributes ✅

  • Novo teste JSON: verifica merge correto de globalAttributes + instance attributes (override funciona)
  • Novo teste Text: verifica que key=value pairs aparecem no output texto
  • Logger.globalAttributes limpo em todos os afterEach para evitar leaks entre testes

6. Workflows (pendente - token sem scope workflow)

As correções de CI/CD foram preparadas mas não puderam ser pushadas porque o token atual não tem o scope workflow. As mudanças necessárias são:

  • publish-module.yml: remover (duplica npm-publish.yml)
  • npm-publish.yml: adicionar branch main
  • publish-beta-version.yml: bump actions v2→v4, Node 22→20, fix tag pattern *.*.**.*.*-beta.*

Build: ✅ | Tests: 218 passed | Coverage: 95.19% statements, 96.42% lines

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 10 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

on:
push:
tags:
- '*.*.*'
Comment on lines +13 to +20
- uses: actions/checkout@v2
- name: 'cat package.json'
run: cat ./package.json
- name: install node v22
uses: actions/setup-node@v2
with:
registry-url: 'https://registry.npmjs.org'
node-version: 22
{
"name": "@ozmap/logger",
"version": "0.2.8",
"version": "0.3.0-beta.5",
Comment on lines +11 to +18
- uses: actions/checkout@v2
- name: 'cat package.json'
run: cat ./package.json
- name: install node v22
uses: actions/setup-node@v2
with:
registry-url: 'https://registry.npmjs.org'
node-version: 22
Comment on lines +1 to +27
on:
push:
branches:
- main

jobs:
build:
name: tsc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: 'cat package.json'
run: cat ./package.json
- name: install node v22
uses: actions/setup-node@v2
with:
registry-url: 'https://registry.npmjs.org'
node-version: 22
- name: npm install
run: npm install
- name: tsc
run: npm run build
- name: publish
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
access: public
Comment on lines +1 to +9
on:
push:
branches:
- main

jobs:
build:
name: tsc
runs-on: ubuntu-latest
lib/Logger.ts Outdated
Comment on lines +87 to +88
* @param opts.allowExit Allow process to exit naturally (uses server.unref()).
* @param opts.timerTTL TTL for timers in ms (default: 10min). Set to 0 to disable cleanup.
…ributes, restore data field, fix lockfile, improve error fallback
@raupp
Copy link
Contributor

raupp commented Mar 14, 2026

Code Review - Segunda rodada de correções (commit b42d302)

Todos os comentários de revisão restantes foram endereçados:

1. globalAttributes não inicializado ✅

  • Alterado de static globalAttributes? para static globalAttributes: LogContext['attributes'] = {}
  • Elimina risco de TypeError ao fazer spread de undefined em runtime

2. Campo data removido (breaking change) ✅

  • Restaurado data como alias deprecated de body no payload JSON
  • Mantém retrocompatibilidade para consumidores existentes

3. Fallback de serialização inseguro ✅

  • O catch agora constrói um payload mínimo garantidamente serializável (sem attributes/context problemáticos)
  • Se attributes contiver valores não-serializáveis (BigInt, Symbol), o fallback não vai crashar

4. JSDoc setGlobalAttributes

  • Documentado que chamadas subsequentes substituem (não fazem merge) dos atributos globais

5. Alinhamento JSDoc do constructor ✅

  • opts.allowExit e opts.timerTTL alinhados com os demais @param

6. package-lock.json version mismatch ✅

  • Corrigido 0.3.0-beta.00.3.0-beta.5 para alinhar com package.json

7. Workflows (stash — precisa de token com scope workflow) ⚠️

As seguintes mudanças estão prontas localmente em stash mas o token atual não permite push de workflow files:

  • publish-module.yml: removido (duplicata de npm-publish.yml)
  • npm-publish.yml: adicionada branch main
  • publish-beta-version.yml: actions v2→v4, Node 22→20, tag pattern *.*.**.*.*-beta.*

Para aplicar, fazer push com token que tenha scope workflow ou editar diretamente no GitHub.


Build: ✅ | Tests: 218 passed | Coverage: 95.20% stmts, 96.42% lines

@raupp raupp requested a review from Copilot March 14, 2026 23:59
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 10 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 72 to +79
return (level: LevelTag, ...args: unknown[]) => {
const data = args.map((arg) => stringify(arg)).join(' ');
const labels = formatTextAttributes(attributes);
const message = [`${now()}[${level}]`, tag ?? '', labels, data]
.filter(Boolean)
.join(' ');

logger.log(paint[level](`${now()}[${level}] ${tag ?? ''} ${data}`));
logger.log(paint[level](message));
afterEach(() => {
delete process.env.OZLOGGER_OUTPUT;
delete process.env.OZLOGGER_LEVEL;
Logger.globalAttributes = {};
Comment on lines +3 to +4
branches:
- main
Comment on lines +11 to +20
- uses: actions/checkout@v2
- name: 'cat package.json'
run: cat ./package.json
- name: install node v22
uses: actions/setup-node@v2
with:
registry-url: 'https://registry.npmjs.org'
node-version: 22
- name: npm install
run: npm install
on:
push:
tags:
- '*.*.*'
Comment on lines +13 to +22
- uses: actions/checkout@v2
- name: 'cat package.json'
run: cat ./package.json
- name: install node v22
uses: actions/setup-node@v2
with:
registry-url: 'https://registry.npmjs.org'
node-version: 22
- name: npm install
run: npm install
Comment on lines +40 to +45
const structuredData = {
...timestamp(),
...this.getContext(),
...(Logger.globalAttributes ?? {}),
...(attributes ?? {}),
tag,
Comment on lines 55 to 64
} catch (e) {
structuredData.data = structuredData.body =
'[OZLogger internal] - Unable to serialize log data';
return JSON.stringify(structuredData, getCircularReplacer());
const fallback = {
...timestamp(),
tag,
severityText: level,
severityNumber: LogLevels[logLevelKey],
body: '[OZLogger internal] - Unable to serialize log data'
};
return JSON.stringify(fallback);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants