LogBox: Enterprise ColdFusion Logging Library Released

LogBox , News , Releases Add comments
By: Luis Majano
After much work and restructuring the ColdBox logging capabilities into a standalone library, we have arrived to the birth of LogBox.  The ColdBox logging capabilities exist since version pre 1.0 way back in 2005 and now finally are open for usage with or without ColdBox MVC.  LogBox is part of an entire set of suites of services that the ColdBox 3.0.0 Platform is being built on, which includes:
  • MockBox : An enterprise object mocking/stubbing framework
  • LogBox: Enterprise ColdFusion Logging Library
  • BlenderBox : Enterprise Inversion of Control, Dependency Injection, Annotation and AOP framework
  • CacheBox : Enterprise Caching Engine
  • ColdBox MVC : MVC framework
  • ColdBox Messaging : Cluster Aware JMS messaging and distributed computing
  • SHHH (Others coming soon)
LogBox was retooled as a standalone service and got inspirations from the Log4J project and CFlogger.  The question that you might be asking yourself is: "Can I use LogBox without ColdBox?" Well, yes! However, understand that LogBox IS ColdBox also.  It is part of the new ColdBox 3.0.0 platform currently in development.  However, you can now download a-la-carte parts of the platform or the entire suite of services.  A 3.0.0 alpha is soon to arrive but it has over 85 tickets already closed and can be found on SVN or the nightly build.

Download LogBox 1.0 Beta: http://www.coldbox.org/index.cfm/download
Download MockBox 1.0 Beta: http://www.coldbox.org/index.cfm/download
Want to suggest a feature, fix a bug, new something? User your voice: http://coldbox.uservoice.com/

So let's explore a little about 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. LogBox is part of the ColdBox Platform 3.0 suite of services and libraries. LogBox allows you to easily build upon its logging framework in order to meet any logging or reporting needs your applications has. ColdFusion has the very basic cflog tag that you can use in your applications to leverage file logging but it has many limitations. LogBox allows you to create multiple destinations for your loggings and even be able to configure them or change them at runtime.

Almost every application needs some kind of logging or tracing capabilities and we believe that LogBox fills that void. Although you always have to remember that over-use of logging can slow down an application. However, LogBox offers you the capabilities to filter out or be able to cancel logging noise a-la-carte. LogBox was inspired by the original logging capabilities in ColdBox and in the Log4j project.

Need for Logging

Almost every single application needs some kind of logging and tracing capabilities. One can usually use the now famous cflog or cftrace tags but you can reach a limitation very fast. What if you needed to log only certain severity levels for a particular cfc or piece of code? What if you needed that severity to advice you via SMS or Twitter, yes Twitter? Well, you would have to build all of these advising and logging capabilities yourself. Also, inserting log statements is tedious, time consuming and sometimes it just pollutes our real code. What if you wanted to turn it off easily, or reconfigure it? Well, you can obviously feel the pain now as we all have dealt with these situations. Therefore, LogBox has been built.

What Can LogBox Do For You?

  • LogBox can handler the inserting of logging or tracing statements in your applications with a very easy to use API and gives you the ability to manage it externally without touching application code.
  • You can configure LogBox via the following means:
    • A programmatic configuration file (cfc)
    • An xml configuration file
  • LogBox categorizes your logging or tracing statements according to user-defined categories that can be configured at runtime or pre-runtime. All of these categorizations can have their own logging level ranges and even their own destination points or what we refer to as LogBox Appenders.
  • LogBox Appenders are the different destination points you can configure for your logging or tracing statements. LogBox also offers a basic extensible API so you can build and extend upon the Appender framework according to your logging or tracing needs. This gives you complete control and flexibility of how to expand LogBox. Some appenders included in LogBox can log to the following destinations: File, Database, Twitter, Sockets, Email, ColdFusion logging, System Console, and much more.
    • LogBox also facilitates the creation of your very own customized message formats via Layouts. You can create a Layout component that can be configured in to ANY LogBox appender so it can spit out your very own customized messages.
    • LogBox can be instantiated as many times as you want and used as many times as you like in a single application. There are no restrictions upon its usage.
LogBox Appenders

Appender Description
AsyncFileAppender An Asynchronous file appender
AsyncRollingFileAppender An Asynchronous file appender that can do file rotation and archiving
CFAppender Will deliver messages to the coldfusion logs
ConsoleAppender Will deliver messages to the console via system.out
DBAppender Will deliver messages to a database table. It can even auto create the table for you.
EmailAppender Will deliver messages to any email address
FileAppender Will deliver messages a file
RollingFileAppender A file appender that can do file rotation and archiving
ScopeAppender Will deliver messages to any ColdFusion scope you desire
SocketAppender Will connect to any server socket and deliver messages
TwitterAppender Can either send direct messages to a twitter user or update a status of a twitter user.

This is just a simple introduction to LogBox.  If you are compelled to continue reading, then please continue in our wiki at http://ortus.svnrepository.com/coldbox/trac.cgi/wiki/cbLogBox


7 responses to “LogBox: Enterprise ColdFusion Logging Library Released”

  1. Aaron Longnion Says:
    @Luis - thanks so much for putting this together! We have become frustrated with the limitations of cflog, especially in our architecture with 8 CF8 instances in a cluster. It looks like LogBox can solve all our logging issues!
  2. Curt Gratz Says:
    This looks awesome. I had created my own Coldbox DB log tool, but it is great that it will now be baked right in. Email logging also...Good thoughts.

    Thanks as always,
    Curt Gratz
  3. Dan Wilson Says:
    Luis,

    This project looks pretty cool. I'd like to talk to you about the dependencies of this project. Maybe this would give us a collaboration opportunity?


    DW
  4. Tony Garcia Says:
    Sounds really cool, Luis. Looking forward to the new platform. One thing, though: Isaac Dealey already has a project named CacheBox:
    http://cachebox.riaforge.org
  5. Luis Majano Says:
    Hmm, good catch. Well, a renaming will have to take place then. Although the real name is ColdBox CacheBox, but anyways, any ideas?

    Maybe just ColdBox Cache, which is the original name.
  6. Luis Majano Says:
    @dan
    Thanks Dan!! LogBox is standalone, so you can use it as is or integrate it as is. I sent you an email with some details!!

    Gracias Amigo!
  7. Sami Hoda Says:
    Excellent work as always Luis!

Leave a Reply