Is there a way for manually write to error.log, so that I can log minor problems to this file?
Is there a way for manually write to error.log, so that I can log minor problems to this file?
From a web app? If you print to standard error, it should show up in your logs:
print >> sys.stderr, "a debugginng message"
Or look into using the logging
module...
In an app of any size, I would definitely suggest the logging
module. You can log to stderr
for now (using the StreamHandler
and switch to separate log files later if you wish. You can also leave debugging output in your code which can be switched on at a later time to track down issues.
Thanx! :-)