logging

Why would you use logging.properties if App Engine automatically logs stdout & stderr to INFO & WARNING?

According to the documentation for Google App Engine for Java: The App Engine Java SDK includes a template logging.properties file, in the appengine-java-sdk/config/user/ directory. To use it, copy the file to your WEB-INF/classes directory (or elsewhere in the WAR), then the system property java.util.logging.config.file ...

Multithread safe logging

We have an application that runs in multiple threads and uses Log4Net as logging framework. We encountered a scenario where some log events weren't logged. As mentioned in the docs, the FileAppender and the other Appenders are "not safe for multithreaded operations". I searched the web for solutions or Appenders, but couldn't find any. ...

What is a good size (in bytes) for a log file?

I am using the python logging modules RotatingFileHandler, and you can set the maximum size of each log file. What is a good maximum size for a log file? Please give your answer in bytes. ...

what is the most efficient way of reading a log file in java?

What is the most efficient(fast and safe) way of reading a log file in java? The log file continuously(almost every second) gets updated. ...

How to prevent log file truncation with python logging module?

Hi there, I need to use python logging module to print debugging info to a file with statements like: logging.debug(something) The file is truncated (i am assuming - by the logging module) and the messages get deleted before I can see them - how can that be prevented? Here is my logging config: logging.basicConfig( level = loggi...

Programmatically configure Jetty's logger

How do I programmatically configure Jetty's logger? I'm using Jetty in a standalone application and want to change the log level of some of Jetty's internally generated warnings. Ideally I could do this programmatically (ie, in code) without having to specify an XML file. I'm using Jetty 6.1.20. ...

How to get log4net to generate log files when running as non-administrator user?

A process running as a non-administrator user does not have rights to write to the program files folder. What is the best way to configure log4net to write to a location that a non-administrator user has rights to? Ideally there would be: A single configuration file or configuration from code would work for all versions of MS Windows...

Log web page viewing sequence - even after BACK pressed

I have a log of web pages viewed by users. This is to facilitate diagnosis of problems, and review user activity (which can be revealing! and lead to improvements to the site) I log lots of data to enable recreating what the user did - all the Form variables, cookies, etc. I also log when the page finished rendering in the clients brow...

SQL Server: Indexing date column in a log table

Example table: CREATE TABLE Log ( logID int identity logDate datetime logText varchar(42) ) logID is already indexed because it is a primary key, but if you were to query this table you would likely want to use logDate as a constraint. However, both logID and logDate are going to be in the same order because logDate w...

Thread safety advice when using DataGridView and BindingList in C#

I'm writing a class for logging events. My LogClass is implemented as a singleton, and any class in the system can write a log entry. The entries are stored in a List and when a buffer is filled they get dumped to the disk. I'm using a DataGridView to display the contents of the LogClass during execution, therefore I used the BindingLis...

Can java.util.logging be configured to use compressed log files?

Is it possible to configure java.util.logging to compress log files when it "rolls" onto using a new log file? For example, an extract from my log configuration file looks like this: java.util.logging.FileHandler.level = ALL java.util.logging.FileHandler.pattern = /blah.log java.util.logging.FileHandler.limit = 10000000 java....

Supressing Log Output for NAnt Delete Task

We are currently using CruiseControl.NET with NAnt 0.85 build scripts and while everything is working well, the log files are a little too verbose for my liking. In particular, when deleting folders using the <delete> task I always get a [delete] Deleting directory entry in the log. Fair enough but this task is run in a foreach loop ...

SQL Mass deletes

I'm trying to shrink some databases down so that my developers can load them to their local machines. I've identified several tables that hold historical data (10+ years worth) that would dramatically reduce the overall database size (50% or more) if I remove records older than X days. The delete statement that I'm using is demonstrate...

Can I send STDOUT and STDERR to a log file and also to the screen in Win32 Perl?

I've searched the Internet and have found some good solutions for teeing STDOUT to 2 different places. Like to a log file and also to the screen at the same time. Here's one example: use IO::Tee; my $log_filename = "log.txt"; my $log_filehandle; open( $log_filehandle, '>>', $log_filename ) or die("Can't open $log_filename for append...

How can I register my own callback with commons logger

I'm setting up an openid site, and using the javaopenidsxip library and it uses commons logger. I already have my own application logger, how do I get it to call my logger instead of writing to stdout? ...

Best Practice of Using org.apache.commons.logging.LogFactory.getLog

May I know what is the best practice of using org.apache.commons.logging.LogFactory.getLog? For me, I use it the following way : public class A { private static final Log log = LogFactory.getLog(A.class); } public class B { private static final Log log = LogFactory.getLog(B.class); } So, if I have 100 of classes, 100 of stat...

regsrv32 dllregisterserver output

we're shipping a shell extension dll (registered with regsvr32). is there an easy way to get debug output from this dll from another application (so we can send these traces home when something is broken)? any ideas? what's the easiest way to get logdata from the dll to another process? ...

PHP error logging does not work via .htaccess

Hi guys, I need to have all PHP errors logged to a file on my centOS box. I think I'm doing everything I'm supposed to. Here's my .htaccess file: php_flag display_errors off php_flag log_errors On php_flag error_log /var/www/vhosts/hostname/logs/fo_errors.log In my php.ini, I have error_reporting=E_ALL set. Apache does parse .hta...

Logging facilities and Qt

What logging facilities do you use whit Qt ? Do you choose qDebug(), qWarning(), qCritical(), qFatal() methods, or maybe something like Log4cpp (Log4cplus etc.), or maybe some custom-maked code ? ...

Clever way to estimate URL clicks per hour without logging every click ?

I have a site with millions of URLs. Each time a URL is clicked, a database row corresponding to that URL is updated indicating the timestamp of that click. I would like to, using additional columns for sure, but without the need to insert distinct rows for every click, estimate the number of clicks per hour this URL receives. Some...