Dynamic Configurations

In this large SaaS application I’m developing, I’m confronted often with dynamic configurations. There is always a “root” configuration that can be relied upon and individual accounts can customize those configurations. What I am struggling with is, in this dynamic environment, is when to bring on custom configurations, which are very typically (and at least as I move from legacy to the new configuration) database driven.

On top of that, for security reasons, it is not always going to be easy to “touch” configurations once a client SaaS site is configured and deployed, which means there must be web interfaces and accessible data that the user can interact with to change their environment.

A good example is my recent tackling of logbox (first time). What an amazing tool set. One of the problems I’m encountering is that we want to be able to have the user turn on/off logging so that we can have it turned off by default, so nothing gets logged to any appenders (ok, perhaps some would be “system” level that we always want turned on) until an issue rises…then we’d ask the client to turn logging on and repeat the process or keep it on for a day of use then deliver those logs to us. To compound that, in both dev and production, we’d like an email appender to be dynamic so that the use who wants logging turned on will receive the emails (and they might be carboned to us for review).

As you can see, there could be a lot of configuration entanglement. Generally speaking, the best solution often seems to be a database appender since we would not have to worry about file clutter or email configuration…but we can see advantages where the logging could serve as a notification system to the client (and to us)…where some appenders might be configured (read: hard coded) to deliver to us while others would be dynamic and sent to the user at their request.

So, does anyone have any recommendations on how to:

  • best use logging as a notification system of sorts with a dynamic email appender
  • best allow logging options to be turned on / off at the users request
  • best organize their appenders to be useful and effecient
    …or of course point me to something that might give me a clue? I have read the documentation and gone through Brad’s video demonstration (both very helpful)

Thanks,

Mike

Well duh…turns out there are all these cool exposed methods to the logbox / logger object I can use. That kinda answers some of the how, but from a best practices point of view, if anyone would still like to chime in…

Mike