Author |
Message
|
anurag.munjal |
Posted: Tue Jul 30, 2013 7:56 pm Post subject: ExceptionAndLoggingFramework |
|
|
 Voyager
Joined: 08 Apr 2012 Posts: 97
|
Hi Team,
Just wanted to have your opinion about whats the best standard that is followed accross the globe for WMB Exception and Logging framework.
Code: |
Is it -> store in a DataBase OR -> Write stuff in a File? |
i have seen both scenarios in my past 3 diffrence projects, i felt database logging is more easy to read.
What do you guys say?
Thank you |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Jul 30, 2013 11:05 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
To keep it simple and flexible,
1) write events to a queue
2) read events from q and do whatever. eg write to a DB.
A DB can get large though. I'm looking ar one at the moment. It is some 95Gb in size and holds messages for the past 7 days (Input & Output and 60 days for errors).
The advantage is that you can change the logging without affecting (n many cases) the code running in the flows.
I am sure that others will be along shortly with even better solutions.
just my 2p worth. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Jul 31, 2013 3:17 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Databases are overkill for logs. Logs are meant to be read by humans. The exception is when you need to report transaction statistics, then its not a log anymore and really should be using in-built accounting to do that.
If you need to log errors, warnings, system events, use Logger or log4j. That IS the standard (the IIB product does not store its own logs in a database, it uses Logger). _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
goffinf |
Posted: Wed Jul 31, 2013 4:56 am Post subject: Re: ExceptionAndLoggingFramework |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
anurag.munjal wrote: |
Hi Team,
Just wanted to have your opinion about whats the best standard that is followed accross the globe for WMB Exception and Logging framework.
Code: |
Is it -> store in a DataBase OR -> Write stuff in a File? |
i have seen both scenarios in my past 3 diffrence projects, i felt database logging is more easy to read.
What do you guys say?
Thank you |
You need to think about the use cases you are trying to support by capturing those logged events. For example if you were creating a business audit trail and that was used for non-repudiation, then you probably want to put them into a durable store which has some level of resilience. If you are creating logs to understand the execution path of a message as it passes through your MB infrastructure for [say] fault diagnosis, you might choose a different approach. In short, one of the things you need to consider is what would be the consequence of a failure in part of your logging solution. If it is providing a significant piece of business capability or operational support, then factor that into your solution (one approach doesn't always cover everything - and we certainly distinguish between audit and log for example).
HTHs
Fraser. |
|
Back to top |
|
 |
anurag.munjal |
Posted: Thu Aug 01, 2013 2:26 am Post subject: THANK YOU ALL |
|
|
 Voyager
Joined: 08 Apr 2012 Posts: 97
|
Hi Guys,
Thank you for your inputs/suggestions.
I have been associated with Banking domain projects since 2 years and i have seen DATABASE used for all the framework logging...probably because of the sensitivity of the data.
Now am working with a Energy&Utility client and here i see no DATABASE for loging, but plain file writing of framework logging etc...
so its all quite clear a picture to me now..Cheers!!  |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Aug 01, 2013 2:35 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
lancelotlinc wrote: |
Databases are overkill for logs. Logs are meant to be read by humans. . |
In your Opinion that is.
Frankly wading through multi-MB files is a real PITA especially when a simple select does the job for you.
If you construct your logging/auditing/error system well, you can easily relate the input ID of a message to its output in a single select. As a result queries about what happened when can be answered in minutes and not hours.
Just my humble opinion that is. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Thu Aug 01, 2013 3:25 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
smdavies99 wrote: |
lancelotlinc wrote: |
Databases are overkill for logs. Logs are meant to be read by humans. . |
In your Opinion that is.
Frankly wading through multi-MB files is a real PITA especially when a simple select does the job for you.
If you construct your logging/auditing/error system well, you can easily relate the input ID of a message to its output in a single select. As a result queries about what happened when can be answered in minutes and not hours.
Just my humble opinion that is. |
Grep is a wonderful tool. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Aug 01, 2013 3:31 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
lancelotlinc wrote: |
Grep is a wonderful tool. |
not if you are on windows and 'grep' is not an allowed tool it isn't.
Meh, each to his own. For me, logging to files is so MQSI V2.1 ish.
also you don't need to have login access to the runtime box to view the logs. In some sites, even to get that, (simple readonly access) almost takes an act of Congress. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Thu Aug 01, 2013 3:39 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
smdavies99 wrote: |
lancelotlinc wrote: |
Grep is a wonderful tool. |
not if you are on windows and 'grep' is not an allowed tool it isn't.
Meh, each to his own. For me, logging to files is so MQSI V2.1 ish.
also you don't need to have login access to the runtime box to view the logs. In some sites, even to get that, (simple readonly access) almost takes an act of Congress. |
I feel your pain and think we're aligned on this to the extent that our environment sometimes dictates what we can and cannot do. Cheers ! _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
|