coldbox-logging

Configure ColdBox LogBox logging with appenders, environment levels, and logger injection.

1|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ColdBox/skills --skill coldbox-logging
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coldbox-logging
Source: https://github.com/ColdBox/skills/tree/main/coldbox/logging
Command: npx skills add https://github.com/ColdBox/skills --skill coldbox-logging

SYSTEM DOCUMENTATION & REQUIREMENTS

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.

Frequently Asked Questions about coldbox-logging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure LogBox logging for different environments in ColdBox?

Configure ColdBox LogBox logging using a dedicated config file, inline DSL, or external configFile to define per-environment log level overrides, directing DEBUG logs to console in development and WARN to rolling files in production.

What is the best way to inject a logger into a ColdBox handler?

Inject a contextual logger into ColdBox handlers, interceptors, or services using the WireBox injection token logbox:logger:{this}, which provides component-specific contextual logging without programmatic controller access.

How do I set up appenders for console, rolling file, and email in ColdBox?

Set up LogBox appenders for console, rolling file, and email within your ColdBox configuration file to route WARN logs to files, output DEBUG to console, and automatically notify operations on FATAL errors.

Can I access the ColdBox logger programmatically without WireBox injection?

Yes, you can access LogBox programmatically through the ColdBox controller or proxies, enabling dynamic logging control in application components where WireBox injection tokens are not utilized.

How does category inheritance work for LogBox loggers?

LogBox category inheritance uses package-level naming conventions to control logging hierarchies, allowing you to apply broad log level configurations to parent categories that automatically cascade to child components.

How do I centralize error logging in a ColdBox application?

Centralize error logging in ColdBox by registering global onException interceptors and configuring email appenders, capturing and routing application errors to designated notification channels automatically.