/*
 * Copyright (C) 2019 Robert Bosch GmbH Copyright (C) 2019 Robert Bosch Manufacturing Solutions GmbH, Germany. All rights reserved.
 */

import { LogLevelStrings } from './loglevel';

/**
 * See https://inside-docupedia.bosch.com/confluence/display/NXP/Logging+Guidelines
 */
export class LogObject {
  timestamp: Date;
  environment?: string;
  system?: string;
  application?: string;
  version?: string;
  instance?: string;
  loglevel: LogLevelStrings | string;
  message: string;
  error?: Error;

  toString(): string {
    return `[${this.loglevel}] ${this.message}`;
  }
}
