


The way that log entries are created will depend upon the language your application is written in.
LINUX LOGTAIL NORWAP MANUAL
Secondly, the log files fill up disk space, and will continue to do so unless manual action is taken to remove them or reduce their size.īetter would be to use the system logging facilities that every Linux system has, which takes care of the following for free: How Not To Do Application Loggingĭevelopers often create what is intended to be temporary logfiles – for example, /tmp/myapplication.log – in order to see what’s going on.įirstly – and for good reason – such temporary logging often becomes more permanent than intended. The good news is logging like this needn’t be hard to do. If you’re looking to tune up your sales reports, that would be the area to focus on. Nov 5 19:58:07 db2 sales_summary: Closed /tmp/tmp.PAykYbLHg9/sales.csvĮvery section of this job takes seconds, except for “Getting monthly sales by area”. Nov 5 19:58:07 db2 sales_summary: Writing /tmp/tmp.PAykYbLHg9/sales.csv Nov 5 19:58:07 db2 sales_summary: Retrieved monthly sales by area Nov 5 19:30:09 db2 sales_summary: Getting monthly sales by area Nov 5 19:30:09 db2 sales_summary: Retrieved monthly lead data Nov 5 19:30:07 db2 sales_summary: Getting monthly lead data Nov 5 19:30:07 db2 sales_summary: Retrieved monthly sales data Nov 5 19:30:05 db2 sales_summary: Getting monthly sales data Nov 5 19:30:05 db2 sales_summary: Retrieved dashboard stats Nov 5 19:30:01 db2 sales_summary: Getting dashboard stats Here’s an extract from an application log: Nov 5 19:30:01 db2 sales_summary: Job Started Ideally, logging will be built into the application as it’s developed rather than waiting until questions come up and then trying to retrofit it later (and possibly having to justify them in a change control process).Įffective logging from your application can highlight false assumptions, programming errors and performance issues. What helps when faced with questions such as these is a sufficiently detailed record of what happened when, and that’s where application logging can help. “I get an error when I try to edit a customer’s address” “How can we speed up the sales summary report?”
