Class ActionLoggingService
java.lang.Object
io.github.jspinak.brobot.logging.modular.ActionLoggingService
Centralized service for logging action executions using modular formatters.
This service acts as the single point of entry for action logging, routing ActionResult objects to the appropriate formatter based on configured verbosity level and outputting the formatted messages.
Design principles: - Single responsibility: Only handles logging coordination - Configurable: Verbosity level driven by configuration - Extensible: Easy to add new formatters or output destinations - Testable: Clear separation of concerns
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet available formatters for testing/debugging.Get current verbosity level for external inspection.void
logAction
(ActionResult actionResult) Log an action execution using the configured verbosity level.void
logAction
(ActionResult actionResult, ActionLogFormatter.VerbosityLevel verbosityLevel) Log an action with explicit verbosity level override.boolean
wouldLog
(ActionResult actionResult) Check if a specific action would be logged at current verbosity level.
-
Constructor Details
-
ActionLoggingService
-
-
Method Details
-
logAction
Log an action execution using the configured verbosity level.- Parameters:
actionResult
- the result of action execution
-
logAction
Log an action with explicit verbosity level override.- Parameters:
actionResult
- the result of action executionverbosityLevel
- the specific verbosity level to use
-
wouldLog
Check if a specific action would be logged at current verbosity level.- Parameters:
actionResult
- the action result to check- Returns:
- true if this action would produce log output
-
getAvailableFormatters
Get available formatters for testing/debugging. -
getCurrentVerbosityLevel
Get current verbosity level for external inspection.
-