feat(format): Enhance format module with rollback, diff reporting, and improved parallel execution
This commit is contained in:
@@ -1,6 +1,28 @@
|
||||
import { commitinfo } from '@push.rocks/commitinfo';
|
||||
import * as plugins from './plugins.js';
|
||||
|
||||
// Create logger instance
|
||||
export const logger = plugins.smartlog.Smartlog.createForCommitinfo(commitinfo);
|
||||
|
||||
logger.addLogDestination(new plugins.smartlogDestinationLocal.DestinationLocal());
|
||||
// Add console destination
|
||||
const consoleDestination = new plugins.smartlogDestinationLocal.DestinationLocal();
|
||||
logger.addLogDestination(consoleDestination);
|
||||
|
||||
// Verbose logging helper
|
||||
let verboseMode = false;
|
||||
|
||||
export const setVerboseMode = (verbose: boolean): void => {
|
||||
verboseMode = verbose;
|
||||
logger.log('info', `Verbose mode ${verbose ? 'enabled' : 'disabled'}`);
|
||||
};
|
||||
|
||||
export const isVerboseMode = (): boolean => {
|
||||
return verboseMode;
|
||||
};
|
||||
|
||||
// Custom log method with verbose support
|
||||
export const logVerbose = (message: string): void => {
|
||||
if (verboseMode) {
|
||||
logger.log('info', `[VERBOSE] ${message}`);
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user