Why do we need logging
Yes, really, why do we need it in a first place? Usually we use logging for the
what drug is similar to reglan glassbyggestein.no viagra sold in usa escrow pharmacy http://azylpes.cz/ks/cream/cheap-viagra-euros/ viagrasamplesonline codeine promethazine syrup buy online primatene mist order from canada zoloft without insurance amoxil 500mg dosage http://www.oko.awfis.net/hip/cialis-with-dapoxetine xenical paypal androgel 1 62 uk
- Errors/exceptions monitoring and debugging purposes (in more generic sense);
- Non-time-critical statistics/analytics;
I’d say first one is the primary purpose and second is usually secondary. There are two approaches for logs (since they might get huge): store them all on a lot of machines (usually with HDFS or some similar file system) and keep rolling them out either doing archives for old ones or just rolling older ones over. For this post I will stick to second scenario only.
What do we want from logging?
Basically, usually it is simple:
- Not to overrun space on hard drive;
- Must have a fixed list of files where older ones are rolled over;
- Naming of files in the list should be based on date/time;
- There should be easy way to inject logging into our DI framework.
Issues with it
1. Guice Logback integration 2. Lockback rolling policies;