@scayle/storefront-nuxt
Version:
Nuxt integration for the SCAYLE Commerce Engine and Storefront API
18 lines (17 loc) • 828 B
TypeScript
import type { LogObject, ConsolaReporter, FormatOptions, ConsolaOptions } from 'consola';
/**
* This custom Consola reporter formats log objects in a JSON string.
* It is a modified version of the built-in BasicReporter
* https://github.com/unjs/consola/blob/main/src/reporters/basic.ts
*/
export declare class JSONReporter implements ConsolaReporter {
formatStack(stack: string, message: string, opts: FormatOptions): string;
formatError(err: object, opts: FormatOptions): string;
formatArgs(args: unknown[], opts: FormatOptions): string;
formatDate(date: Date, opts: FormatOptions): string;
filterAndJoin(arr: (string | undefined | null)[]): string;
formatLogObj(logObj: LogObject, opts: FormatOptions): string;
log(logObj: LogObject, ctx: {
options: ConsolaOptions;
}): boolean;
}