UNPKG

@mkpro118/semantic-change-detector

Version:

Semantic change detection for TypeScript and TSX code with GitHub Actions integration

62 lines (61 loc) 2.12 kB
/** * Defines the verbosity levels for logging. * * @library-export * @public */ export declare enum LogLevel { /** No output except for fatal errors. */ QUIET = 0, /** Machine-readable output, typically JSON, for scripting. */ MACHINE = 1, /** Standard human-readable output for normal operation. */ VERBOSE = 2, /** Maximum output for developers debugging the tool itself. */ DEBUG = 3 } /** * A simple logger class to handle different levels of verbosity. * It allows setting a log level and provides methods to log messages * that will only be displayed if the current level is high enough. */ declare class Logger { /** The current logging level. Messages below this level will be suppressed. */ private level; /** * Sets the current logging level. * @param level The new logging level to set. */ setLevel(level: LogLevel): void; /** * Logs a message intended for machine consumption. * This output is typically used for scripting and is suppressed in QUIET mode. * @param message The machine-readable message to log. */ machine(message: string): void; /** * Logs a message for standard, human-readable output. * This is internal application logging and goes to stderr to keep stdout clean for actual results. * @param message The verbose message to log. */ verbose(message: string): void; /** * Logs a debug message for developers of this tool. * These messages are intended to help diagnose issues and are written to stderr. * @param message The debug message to log. */ debug(message: string): void; /** * Outputs application results to stdout. * This is for the actual application output (analysis results), not logs. * Always writes to stdout regardless of log level. * @param message The application output message. */ output(message: string): void; } /** * The singleton instance of the Logger used throughout the application. */ export declare const logger: Logger; export {}; //# sourceMappingURL=logger.d.ts.map