zephyr-agent
Version:
Zephyr plugin agent
40 lines • 1.47 kB
text/typescript
/**
* File-based logging system that writes logs to ~/.zephyr/logs/ Each build run gets its
* own directory with separate log files per type
*/
type LogFormat = 'json' | 'toon';
export interface StructuredLogData {
level: 'info' | 'warn' | 'error' | 'debug';
action?: string;
message: string;
data?: Record<string, unknown>;
timestamp?: number;
}
/**
* Get the base log directory path Checks ZEPHYR_LOG_PATH env var, defaults to
* ~/.zephyr/logs/
*/
export declare function getLogBasePath(): string;
/** Initialize a new log run directory Called once per build */
export declare function initializeLogRun(): string;
/** Get the current run directory */
export declare function getCurrentRunDir(): string | null;
/** Reset the run directory (for testing or new builds) */
export declare function resetLogRun(): void;
/** Write a log entry to the appropriate file */
export declare function writeLogToFile(logData: StructuredLogData): void;
/** Write a summary file with metadata about the run */
export declare function writeRunSummary(data: {
buildId?: string;
applicationUid?: string;
duration?: number;
success: boolean;
errorCount?: number;
warnCount?: number;
}): void;
/** Check if file logging is enabled */
export declare function isFileLoggingEnabled(): boolean;
/** Get the log file format (json or toon) */
export declare function getLogFormat(): LogFormat;
export {};
//# sourceMappingURL=file-logger.d.mts.map