Skip to content

Example in README leads to TypeScript errors #6

@thomergil

Description

@thomergil

I can't just use a plain string for logLevel. It leads to TypeScript errors. I have to do:

import VueLogger from 'vuejs3-logger'
import { LogLevels } from 'vuejs3-logger/dist/enum/log-levels'

const LOG_THRESHOLD = isProduction() ? LogLevels.ERROR : LogLevels.DEBUG
const vueLoggerOptions = {
  isEnabled: true,
  logLevel: LOG_THRESHOLD,
  stringifyArguments: false,
  showLogLevel: true,
  showMethodName: true,
  separator: '|',
  showConsoleColors: true,
}
app.use(VueLogger, vueLoggerOptions)

The README should reflect this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions