[Coldbox 3.7] Quick Logbox Question

When logging to the Database with the DBAppender can I add fields in the database or am I only limited to:

  • id : UUID
  • severity : string
  • category : string
  • logdate : timestamp
  • appendername : string
  • message : string
  • extrainfo : string
    The basic idea would be to use this to keep track of user activity. So, if an Admin deleted a user, I would log the users ID, the Admin’s ID and what action was taken.


Just extend the logger (or copy it and make your own). Your version can have whatever columns you want. You’ll just have to decide how to pass that extra data to the appender. I’ve done it before with a struct in the extra info field of the logEvent object.



ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Thanks, sounds like a fun project!