UNPKG

@amadeus-it-group/kassette

Version:

Development server, used mainly for testing, which proxies requests and is able to easily manage local mocks.

36 lines (35 loc) 1.2 kB
import { ConsoleSpec, LogPayload, ErrorLogPayload, StringChunk } from './model'; export declare function getConsole(): ConsoleSpec; export declare function createGlobalLogger(console: ConsoleSpec): void; /** * Logs a message and potentially — depending on the given input — * a timestamp, * some data to be highlighted, * a checked/unchecked mark, * an extra line. */ export declare function logInfo({ message, timestamp, data, checked, extraLine }: LogPayload): void; /** * Logs an error message and possibly the given error. */ export declare function logError({ message, exception }: ErrorLogPayload): void; export declare const separator: { message: string; }; /** * Logs a separator line, with extra lines before and after. */ export declare const logSeparator: () => void; /** * Formats a string made of several parts. * * `chunks` is an array of either: * * - values to be converted to strings * - `StringChunk` chunks to be formatted and converted to strings */ export declare function buildString(chunks: Array<any | StringChunk>): string; /** * Returns a timestamp string, which is the current date-time formatted. */ export declare const getTimestamp: () => string;