Chain-of-responsibility pattern: Difference between revisions

Content deleted Content added
m C# example: format code
m updated flow of example
Line 104:
.appendNext(fileLogger(LogLevel.WARNING, LogLevel.ERROR));
 
// Handled by consoleLogger since the console has a loglevelLogLevel of all
logger.message("Entering function ProcessOrder().", LogLevel.DEBUG);
logger.message("Order record retrieved.", LogLevel.INFO);
 
// Handled by consoleLogger and fileLoggeremailLogger since fileloggeremailLogger implements WarningFunctional_Error & ErrorFunctional_Error
logger.message("Unable to Process Order ORD1 Dated D1 For Customer C1.", LogLevel.FUNCTIONAL_ERROR);
logger.message("Order Dispatched.", LogLevel.FUNCTIONAL_MESSAGE);
 
// Handled by consoleLogger and emailLoggerfileLogger assince itfileLogger implements functionalWarning error& Error
logger.message("Customer Address details missing in Branch DataBase.", LogLevel.WARNING);
logger.message("Customer Address details missing in Organization DataBase.", LogLevel.ERROR);
 
// Handled by consoleLogger and emailLogger as it implements functional error
logger.message("Unable to Process Order ORD1 Dated D1 For Customer C1.", LogLevel.FUNCTIONAL_ERROR);
 
// Handled by consoleLogger and emailLogger
logger.message("Order Dispatched.", LogLevel.FUNCTIONAL_MESSAGE);
}
}