import log from 'electron-log/main'

export function initializeLogger(): void {
  log.initialize()
  log.transports.file.level = false
  log.transports.console.level = 'debug'
  log.transports.console.format = '[{h}:{i}:{s}.{ms}] [{level}] [{scope}] {text}'
}

export function getLogger(scope: string): ReturnType<typeof log.scope> {
  return log.scope(scope)
}
