UNPKG

@rollercoaster-dev/rd-logger

Version:

A neurodivergent-friendly logger for Rollercoaster.dev projects

23 lines 1.04 kB
/** * Safely stringify objects for logging, handling circular references and sensitive data * @param obj Object to stringify * @param detectPatterns Whether to detect and redact sensitive data patterns * @param indent Indentation (number of spaces). Pass 0 for compact output (e.g. NDJSON). Default 2. * @returns String representation of the object */ export declare function safeStringify(obj: any, detectPatterns?: boolean, indent?: number): string; /** * Format error objects for logging, including stack traces * @param error Error object * @param includeStackTrace Whether to include stack traces * @returns Formatted error context */ export declare function formatError(error: Error, includeStackTrace?: boolean): Record<string, string>; /** * Format a date in a human-readable format * @param date Date to format * @param use24HourFormat Whether to use 24-hour format * @returns Formatted date string */ export declare function formatDate(date: Date, use24HourFormat?: boolean): string; //# sourceMappingURL=utils.d.ts.map