Can I override message object in ngx-logger

Is it possible to have ngx-logger use a different object to log? Currently all logs are based on the NGXLogInterface below:

export class NGXLogInterface {
  level: NgxLoggerLevel;
  timestamp: string;
  fileName: string;
  lineNumber: string;
  message: string;
  additional: any[];

However I need to send my logs to an API which is expecting a body like the one below:

  "application": "string",
  "component": "string",
  "area": "string",
  "level": "string",
  "details": "string",
  "executingUser": "string",

Read more here:

Content Attribution

This content was originally published by Cragly at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: