Skip to content

LoggerOptions

Logger configuration options.

typescript
import type { LoggerOptions } from '@meng-xi/vite-plugin/logger'

Type Definition

typescript
interface LoggerOptions {
	name: string
	enabled?: boolean
}

Properties

PropertyTypeDefaultDescription
namestringRequiredPlugin name
enabledbooleantrueEnable logging

Example

typescript
Logger.create({
	name: 'my-plugin',
	enabled: process.env.DEBUG === 'true'
})

Released under the MIT License.