What problem does it solve?
This Skill centralizes configuration and usage of LogBox within ColdBox applications, removing uncertainty about where to define appenders, how to set per-environment log levels, how to inject and access loggers, and how to apply consistent logging best practices across handlers, interceptors, and services.
Core Features & Use Cases
- Configuration Methods: Configure LogBox using config/LogBox.cfc, inline logbox DSL in ColdBox.cfc, or by pointing to an external configFile, choosing the approach that fits your application size and deployment model.
- Injection & Access: Inject contextual loggers via WireBox using the logbox: DSL, access LogBox programmatically through the ColdBox controller or proxies, and register global onException interceptors for centralized error logging.
- Environment & Appenders: Define per-environment log level overrides, configure appenders such as console, rolling file, and email, and use category naming conventions to leverage category inheritance for package-level control.
- Use Case: Send DEBUG logs to console in development, route WARN and above to rolling files in production, and automatically notify ops on FATAL errors while injecting loggers into components for rich contextual log entries.
Quick Start
Configure LogBox to log WARN and above to a rolling file appender and inject logbox:logger:{this} into your handlers.