UNPKG

@wgtechlabs/log-engine

Version:

A lightweight, security-first logging utility with automatic data redaction for Node.js applications - the first logging library with built-in PII protection.

27 lines 1.12 kB
/** * Timestamp formatting utilities * Handles ISO timestamp and local time formatting for log messages */ /** * Generates the current timestamp as both an ISO 8601 string and a compact US English local time string. * * @returns An object containing `isoTimestamp` (ISO 8601 format) and `timeString` (localized time string without spaces) */ export declare function getTimestampComponents(): { isoTimestamp: string; timeString: string; }; /** * Returns a formatted string combining an ISO timestamp and a local time string, each wrapped with specified color codes for console output. * * @param isoTimestamp - The ISO 8601 formatted timestamp to display * @param timeString - The local time string to display * @param colors - An object containing color codes for the timestamp, time string, and reset sequence * @returns The combined, colorized timestamp string suitable for log messages */ export declare function formatTimestamp(isoTimestamp: string, timeString: string, colors: { timestamp: string; timeString: string; reset: string; }): string; //# sourceMappingURL=timestamp.d.ts.map