What is LogBox?
LogBox is an enterprise ColdFusion logging library designed to give you flexibility, simplicity and power when logging or tracing is needed in your applications.
Inspired by Log4J (A Java logger made by Apache)
LogBox is part of the ColdBox Platform 3.0 or can be used as a stand-alone logging library.
Where Do I Use It?
Log messages can come from anywhere in your application.
Logs from the framework (coldbox.system)
Specific component (com.example.order.orderService)
Package (com.example.security)
Ad-hoc locations (ânightly-scheduled-taskâ)
Where Do The Messages Go?
Messages can be sent to any combination of appenders. LogBox ships with 14 appenders!
Files
Asynch files
Emails
Databases
Java sockets
Twitter
Web Services
Custom Logging Levels
Turn debugging of certain services on only when you need it (WireBox debugging)
Log information or debug messages only on dev server, but not in production
Only store logs from certain parts of your framework
Extending LogBox
Create custom appenders
Create custom layouts
Empower your CFCâs to create their own string representations for logging purposes.
Getting Started
The minimum you need to get started:
Define root logger
Configure at least one appender
Thatâs it!
3 Ways To Configure LogBox
Configuration CFC (my favorite)
XML Config
Programmatic Config
Code Examples
Base Functionality
Simple LogBox in a non-ColdBox app
Simple LogBox in a ColdBox app
Configure different logging levels
Configure different logging levels per environment
Configure multiple appenders
Configure multiple categories
Code Examples
Customizing/extending LogBox
Write custom layout
Extra Info examples
Write custom appender
Questions?
Brad Wood
www.codersrevolution.com
brad@bradwood.com
Mailing List:
groups.google.com/group/coldbox
Docs:
wiki.coldbox.org/wiki/LogBox.cfm
Website:
http://www.coldbox.org/