@agility/cli
Version:
Agility CLI for working with your content. (Public Beta)
93 lines (92 loc) • 2.72 kB
TypeScript
import { ConsoleMode } from './console-manager';
export interface LoggingModeConfig {
mode: ConsoleMode;
shouldLogToFile: boolean;
shouldLogToConsole: boolean;
shouldRedirectToUI: boolean;
shouldShowProgress: boolean;
shouldShowVerboseOutput: boolean;
}
export declare class LoggingModes {
/**
* Determine console mode from current state
*/
static determineMode(): ConsoleMode;
/**
* Get logging configuration for a specific mode
*/
static getConfig(mode: ConsoleMode): LoggingModeConfig;
/**
* Get current logging configuration based on state
*/
static getCurrentConfig(): LoggingModeConfig;
/**
* Check if current mode supports specific functionality
*/
static supportsInteractiveUI(): boolean;
static supportsProgressBars(): boolean;
static supportsVerboseOutput(): boolean;
static supportsConsoleOutput(): boolean;
static requiresFileLogging(): boolean;
static requiresUIRedirection(): boolean;
/**
* Conditional logging based on mode
*/
static shouldLog(logType: 'console' | 'file' | 'ui' | 'progress' | 'verbose'): boolean;
/**
* Get mode-specific log format
*/
static getLogFormat(mode: ConsoleMode): {
includeTimestamp: boolean;
includeLevel: boolean;
includeColors: boolean;
includeProgressBars: boolean;
};
/**
* Get current log format
*/
static getCurrentLogFormat(): {
includeTimestamp: boolean;
includeLevel: boolean;
includeColors: boolean;
includeProgressBars: boolean;
};
/**
* Check if we should show specific content based on mode
*/
static shouldShowContent(contentType: 'errors' | 'warnings' | 'info' | 'debug' | 'stats'): boolean;
/**
* Get mode-specific console method overrides
*/
static getModeSpecificBehavior(mode: ConsoleMode): {
redirectConsole: boolean;
showInlineProgress: boolean;
enableColors: boolean;
bufferedOutput: boolean;
};
/**
* Get current mode-specific behavior
*/
static getCurrentBehavior(): {
redirectConsole: boolean;
showInlineProgress: boolean;
enableColors: boolean;
bufferedOutput: boolean;
};
/**
* Validate state configuration for logging
*/
static validateLoggingState(): {
isValid: boolean;
warnings: string[];
errors: string[];
};
/**
* Get mode description for user feedback
*/
static getModeDescription(mode: ConsoleMode): string;
/**
* Get current mode description
*/
static getCurrentModeDescription(): string;
}