Steps I could think of :"
1) Build the chain of Loggers (File, email, DB etc.,)
2) Pass the error (or Info) obejct to First in the chain , say File Logger, this Class will decide if it need to log, if yes, will log and then send your "Error object" to next in the chain - say "Email Logger (sender)"
3) Email Logger Class will check if it eligible to be sent , if yes will send email and will pass it to next in the chain, say DB.
4) DB Logger will check and lets us assume its not a eligible one and will end the chain signallig the completion.
Please refer to my blog where I have talked more about this pattern (of course with a Builder Pattern variation)
Hope this helps.
Tarriq Ferrose Khan
Tarriq Ferrose Khan, Aug 15, 2011