The process of recording errors in log file for diagnostic and Q&A purposes.
Questions tagged [error-logging]
807 questions
686
votes
11 answers
Making Python loggers output all messages to stdout in addition to log file
Is there a way to make Python logging using the logging module automatically output things to stdout in addition to the log file where they are supposed to go? For example, I'd like all calls to logger.warning, logger.critical, logger.error to go to…
user248237
325
votes
16 answers
Print PHP Call Stack
I'm looking for a way to print the call stack in PHP.
Bonus points if the function flushes the IO buffer.

Justin
- 9,419
- 7
- 34
- 41
291
votes
15 answers
Error handling in Bash
What is your favorite method to handle errors in Bash?
The best example of handling errors I have found on the web was written by William Shotts, Jr at http://www.linuxcommand.org.
He suggests using the following function for error handling in…
Noob
274
votes
10 answers
How to use ELMAH to manually log errors
Is it possible to do the following using ELMAH?
logger.Log(" something");
I'm doing something like this:
try
{
// Code that might throw an exception
}
catch(Exception ex)
{
// I need to log error here...
}
This exception will not be…

Omu
- 69,856
- 92
- 277
- 407
186
votes
7 answers
How do you log server errors on django sites
So, when playing with the development I can just set settings.DEBUG to True and if an error occures I can see it nicely formatted, with good stack trace and request information.
But on kind of production site I'd rather use DEBUG=False and show…

kender
- 85,663
- 26
- 103
- 145
153
votes
12 answers
Internal Error 500 Apache, but nothing in the logs?
I'm getting 500 Internal Server errors when I try to make an HTTP POST to a specific address in my app. I've looked into the server logs in the custom log directory specified in the virtual hosts file, but the error doesn't show up there so…

wcolbert
- 1,980
- 3
- 19
- 21
112
votes
3 answers
"[notice] child pid XXXX exit signal Segmentation fault (11)" in apache error.log
I am using Apache/PHP/MySQL stack.
Using as framework CakePHP.
Every now and then I get a blank white page. I can't debug it through Cake, so I peek in the apache error.log and here's what I get:
[Wed Oct 12 15:27:23 2011] [notice] child pid 3580…

mgPePe
- 5,677
- 12
- 52
- 85
97
votes
8 answers
How should you diagnose the error SEHException - External component has thrown an exception
Whenever a user reports an error such as
System.Runtime.InteropServices.SEHException - External component has thrown an exception?
is there anything that I as a programmer can do to determine the cause?
Scenario : One user (using a program my…

sgmoore
- 15,694
- 5
- 43
- 67
95
votes
3 answers
Should I log messages to stderr or stdout?
I have a program I'm writing that I want to write a custom logging facility for (e.g. diagnostic, notice, warning, error).
Should I be using the stdout or the stderr stream to do this? It is an interpreter of sorts and the user can ask it to print…
user193476
75
votes
15 answers
Error logging in C#
I am making my switch from coding in C++ to C#. I need to replace my C++ error logging/reporting macro system with something similar in C#.
In my C++ source I can write
LOGERR("Some error");
or
LOGERR("Error with inputs %s and %d", stringvar,…

Rodney Schuler
- 2,158
- 4
- 23
- 34
73
votes
3 answers
How to enable loglevel debug on Apache2 server
My error.log contains:
Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
I replaced loglevel on apache…

Tiger
- 733
- 1
- 5
- 5
55
votes
9 answers
Simple way to perform error logging?
I've created a small C# winforms application, as an added feature I was considering adding some form of error logging into it. Anyone have any suggestions for good ways to go about this? This is a feature I've never looked into adding to previous…

Analytic Lunatic
- 3,853
- 22
- 78
- 120
48
votes
6 answers
PHP CLI won't log errors
PHP currently will not log errors produced from the command line.
I have:
log_errors = On
error_log = /var/log/php_errors.log
in file /etc/php5/cli/php.ini.
Am I missing a further setting to get this working?

bcmcfc
- 25,966
- 29
- 109
- 181
45
votes
4 answers
Is it possible to specify custom error log format on Nginx?
I can specify custom log format for access_log on Nginx, but it doesn't work for error_log.
Is there anyway to achieve this?

tjeden
- 2,019
- 1
- 13
- 19
42
votes
1 answer
Elmah: How do I log form post data?
Is there a way to log the post request data in ELMAH?
I am getting error emails, and while the error log contains the URL, request method, etc, I am not seeing the actual POST data.
For example,
Here is a sample
Actual request:…

Abe
- 6,386
- 12
- 46
- 75