@rollercoaster-dev/rd-logger
Version:
A neurodivergent-friendly logger for Rollercoaster.dev projects
22 lines (21 loc) • 892 B
TypeScript
/**
* 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
* @returns String representation of the object
*/
export declare function safeStringify(obj: any, detectPatterns?: boolean): 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;