Web Tool Bag  
Home · Articles · Downloads · Discussion Forum · Web Links · News Categories · Synonyms DatabaseApril 18 2024 16:45:11
Navigation
Home
Articles
Downloads
Discussion Forum
Web Links
News Categories
Synonyms Database
Search
Users Online
Guests Online: 1
No Members Online

Registered Members: 856
Unactivated Members: 118
Newest Member: lakim
Forum Threads
Newest Threads
Error: Cannot find m...
Uncaught Error: _reg...
Module build failed:...
Installation
mochi script questions
Hottest Threads
Installation [12]
Any questions and... [5]
Captcha picture d... [4]
Integrate with Vi... [4]
Mods: Sucess/Than... [4]
 
Latest Articles
Ubuntu: the vpn conn...
Howto Install HP Pri...
ReactJS progress met...
react-show-more-text
react-collapsible-co...
How to Debug Using a Log
Logging is the practice of writing a system so that it produces a sequence of informative records,
called a log. Printlining is just producing a simple, usually temporary, log. Absolute beginners
must understand and use logs because their knowledge of the programming is limited; system architects
must understand and use logs because of the complexity of the system. The amount of information
that is provided by the log should be configurable, ideally while the program is running.

In general, logs offer three basic advantages:

• Logs can provide useful information about bugs that are hard to reproduce (such as those that
occur in the production environment but that cannot be reproduced in the test environment).

• Logs can provide statistics and data relevant to performance, such as the time passing between
statements.

• When configurable, logs allow general information to be captured in order to debug unanticipated
specific problems without having to modify and/or redeploy the code just to deal with
those specific problems.

The amount to output into the log is always a compromise between information and brevity. Too
much information makes the log expensive and produces scroll blindness, making it hard to find
the information you need. Too little information and it may not contain what you need. For this
reason, making what is output configurable is very useful. Typically, each record in the log will
identify its position in the source code, the thread that executed it if applicable, the precise time of
execution, and, commonly, an additional useful piece of information, such as the value of some
variable, the amount of free memory, the number of data objects, etc. These log statements are
Beginner sprinkled throughout the source code but are particularly at major functionality points and around
risky code. Each statement can be assigned a level and will only output a record if the system is
currently configured to output that level. You should design the log statements to address problems
that you anticipate. Anticipate the need to measure performance.
If you have a permanent log, printlining can now be done in terms of the log records, and some of
the debugging statements will probably be permanently added to the logging system.

by Robert L. Read

Posted by admin on July 12 2010 10:05:34 6744 Reads · Print
Ratings
Rating is available to Members only.

Please login or register to vote.

No Ratings have been Posted.
Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Member Poll
Which PHP framework do you preffer?

Symfony

Zend

CodeIgniter

PHP on TRAX

eZ Components

Fusebox

PhpOpenbiz

Prado

QPHP

Seagull

You must login to vote.
Shoutbox
You must login to post a message.

Vince
03/10/2011 18:17
Hi, How to remove Register from Login screen? I don't want them to register and have full access! if you leave register then they should not have any rights until the admin assigns them

webtoolz
26/09/2011 08:28
Please describe your problem with more details. Thank you.

bimmer98
22/11/2010 18:31
Help. There was a problem with the request; error regarding feedbackzdr form program

Custom web software development by Devzone Tech
Copyright © 2024 - www.webtoolbag.com