UNPKG

@sentry0/qemu-hook-manager

Version:
2 lines (1 loc) 732 B
import{argv as s}from"node:process";import*as t from"winston";import{consoleFormat as a}from"winston-console-format";import m from"yargs/yargs";export const SCREEN_SIZE=80;const n=m(s.slice(2)).argv;let o=[],r=[t.format.printf(e=>`${e.message}`)];n.verbose&&(o=[t.format.timestamp(),t.format.errors({stack:!0}),t.format.splat(),t.format.json(),t.format.ms()],r=[t.format.colorize(),t.format.splat({depth:1/0}),a({showMeta:!0,metaStrip:["timestamp","service"],inspectOptions:{depth:1/0,colors:!0,maxArrayLength:1/0,breakLength:SCREEN_SIZE,compact:1/0}})]);export const logger=t.createLogger({format:t.format.combine(...o),transports:[new t.transports.Console({levels:t.config.cli.levels,silent:!1,format:t.format.combine(...r)})]});