/** What winston hands a printf template (logform's TransformableInfo); Strapi's default format has added `timestamp`. */ export type LogInfo = { level: string; message: unknown; [key: string | symbol]: unknown; }; /** One console line: `Z : `. */ export const formatLogLine = ({ timestamp, level, message, ...rest }: LogInfo): string => { let restString = JSON.stringify(rest, undefined, 2); restString = restString === "{}" ? "" : restString; return `${timestamp}Z ${level}: ${message} ${restString}`; };