Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Logger

Logger for AMC's DaVinci Apps. Currently there is no way for 3rd party apps to make use of this.

Hierarchy

  • Logger

Index

Constructors

constructor

  • new Logger(logSource: LogSource | string, isDev?: boolean, _apiUrl?: string): Logger
  • Parameters

    • logSource: LogSource | string
    • Default value isDev: boolean = false
    • Default value _apiUrl: string = null

    Returns Logger

Properties

Private _isDev

_isDev: boolean = false

Private _logLevel

_logLevel: LogLevel = LogLevel.Information

Private _logSource

_logSource: string

Static Private ApiServiceUrl

ApiServiceUrl: string = null

Static Private criticalBuffer

criticalBuffer: LogObj[] = []

Static Private debugBuffer

debugBuffer: LogObj[] = []

Static Private errorBuffer

errorBuffer: LogObj[] = []

Static Private informationBuffer

informationBuffer: LogObj[] = []

Static Private loopBuffer

loopBuffer: LogObj[] = []

Static tabId

tabId: string = "00000000-0000-0000-0000-000000000000"

Static Private timerId

timerId: number = null

Static Private traceBuffer

traceBuffer: LogObj[] = []

Static Private warningBuffer

warningBuffer: LogObj[] = []

Accessors

apiUrl

  • get apiUrl(): string
  • set apiUrl(_apiUrl: string): void
  • Returns string

  • Parameters

    • _apiUrl: string

    Returns void

isDev

  • get isDev(): boolean
  • set isDev(_isDev: boolean): void
  • Returns boolean

  • Parameters

    • _isDev: boolean

    Returns void

logLevel

  • Returns LogLevel

  • Parameters

    Returns void

logSource

  • get logSource(): string
  • set logSource(logSourceIn: LogSource | string): void
  • Returns string

  • Parameters

    Returns void

Methods

Private generateLogObj

  • generateLogObj(logLevel: LogLevel, errorCode: ErrorCode, message: string, localTime?: Date): LogObj
  • Parameters

    • logLevel: LogLevel
    • errorCode: ErrorCode
    • message: string
    • Default value localTime: Date = new Date()

    Returns LogObj

Private getLoggerEndpoint

  • getLoggerEndpoint(logLevel: LogLevel): string
  • Parameters

    Returns string

logCriticial

  • logCriticial(message: string, errorCode?: ErrorCode, localTime?: Date): void
  • Parameters

    • message: string
    • Default value errorCode: ErrorCode = ErrorCode.Other
    • Default value localTime: Date = new Date()

    Returns void

logDebug

  • logDebug(message: string, errorCode?: ErrorCode, localTime?: Date): void
  • Parameters

    • message: string
    • Default value errorCode: ErrorCode = ErrorCode.Other
    • Default value localTime: Date = new Date()

    Returns void

logError

  • logError(message: string, errorCode?: ErrorCode, localTime?: Date): void
  • Parameters

    • message: string
    • Default value errorCode: ErrorCode = ErrorCode.Other
    • Default value localTime: Date = new Date()

    Returns void

logInformation

  • logInformation(message: string, errorCode?: ErrorCode, localTime?: Date): void
  • Parameters

    • message: string
    • Default value errorCode: ErrorCode = ErrorCode.Other
    • Default value localTime: Date = new Date()

    Returns void

logLoop

  • logLoop(message: string, errorCode?: ErrorCode, localTime?: Date): void
  • Parameters

    • message: string
    • Default value errorCode: ErrorCode = ErrorCode.Other
    • Default value localTime: Date = new Date()

    Returns void

Private logMessage

  • logMessage(methodLogLevel: LogLevel, message: string, errorCode: ErrorCode, localTime: Date): void
  • Parameters

    Returns void

logTrace

  • logTrace(message: string, errorCode?: ErrorCode, localTime?: Date): void
  • Parameters

    • message: string
    • Default value errorCode: ErrorCode = ErrorCode.Other
    • Default value localTime: Date = new Date()

    Returns void

logWarning

  • logWarning(message: string, errorCode?: ErrorCode, localTime?: Date): void
  • Parameters

    • message: string
    • Default value errorCode: ErrorCode = ErrorCode.Other
    • Default value localTime: Date = new Date()

    Returns void

Private postBuffers

  • Parameters

    Returns void

Private printConsoleLog

  • printConsoleLog(logObj: LogObj): void
  • Parameters

    • logObj: LogObj

    Returns void

pushLogs

  • pushLogs(): void
  • Returns void

syncLogLevel

  • syncLogLevel(): void
  • This method will sync the logLevel with account level log level of the logged in user. User has to be logged in before calling this method.

    Returns void

Static clearTimeOutForLogger

  • clearTimeOutForLogger(): void
  • Returns void

Static Private getLogBufferReference

  • getLogBufferReference(logLevel: LogLevel): LogObj[]
  • Parameters

    Returns LogObj[]

Generated using TypeDoc