6
голосов
4ответов
6758 просмотров

non-blocking read/log from an http stream

I have a client that connects to an HTTP stream and logs the text data it consumes. I send the streaming server an HTTP GET request... The server replies and continuously publishes data... It will either publish text or send a ping (text) message regularly... and will never close the connect...

18
голосов
4ответов
7904 просмотров

Traditional logging vs AOP logging

I'm starting this new project and we are thrashing out our logging/debugging approach and I wanted to put the question to the rest of you on SO, given private final static Logger logger = LoggerFactory.getLogger(getClass()); ... public void doSumething(){ ... if(logger.isDebugEnabled()) logg...

2
голосов
2ответов
1906 просмотров

Subversion for revision history and logging on Source codes

I have tried to find some resource for Subversion how to make revision history and logging message on source code; This question might be a simple We changed our CVS to Subversion. I am having a problem that how to make Revision history and log message to show on source codes. In CVS , we had us...

2
голосов
2ответов
1329 просмотров

How to write logs to files of size 64KB in C++/VC++?

How to write logs to files of size 64KB(to allow notepad to read).Once the file has reached 64KB it should go head and create another , another ...... File names can be automatically generated. I tried the following code static int iCounter=1; CString temp; static CStdioFile f(L"c:\Log1.t...

8
голосов
7ответов
12842 просмотров

What other alternatives to log4net logging exist?

(subjective) I'm looking for what your using to perform logging in your application. This log4net thing is giving me headaches. Is there a better answer out there or is everone just homebrewing a solution? I know the System.Diagnostics.Trace subsystem is quite capable should I layer on this?

4
голосов
1ответов
2124 просмотров

Log files with strange names (Enterprise Library)

I'm using Enterprise Library 3.1 for logging exceptions for some web application. All exceptions should be written to a single XML file (say Errors.xml) on the same server the application run. The problem that sometime in addition to Errors.xml I see files with names like this: 7b53e14b-4b92-43b5...

1
голосов
2ответов
1621 просмотров

Is there any logging library (ex. log4j) in actionscript 3

I am a new as3 developer. Using trace method can help to print messages to the output pane of flash ide. However, in some situations, we want the messages fewer. I have used the Log4j library in java that supports choice a log level for the specific package/class. If you have any information ab...

0
голосов
3ответов
69 просмотров

long running scripts and open text documents

When using a long running script which writes to an open text files, say for logging, which is the better approach: open a file, write to it as needed, and then close when done? Or open the file, write to it, and immediately close it every time? I can see advantages and disadvantages to both. Any...

2
голосов
2ответов
435 просмотров

What access level should loggers be set to?

I'm using SLF4J with Log4J underneath. What access levels should I be setting my loggers to? static final Logger logger = LoggerFactory.getLogger(ClassName.class);

45
голосов
6ответов
45609 просмотров

UTF-8 In Python logging, how?

I'm trying to log a UTF-8 encoded string to a file using Python's logging package. As a toy example: import logging def logging_test(): handler = logging.FileHandler("/home/ted/logfile.txt", "w", encoding = "UTF-8") formatter = logging.Formatter("%(mes...

3
голосов
6ответов
856 просмотров

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...

9
голосов
2ответов
21628 просмотров

Where does system.out.println print from a JSP?

Where does tomcat put the System.out.println output ? I'm not interested in out.println. I'm using a system that uses system.out to log issues, like login success/fail, and I need to look to that generated "log".

23
голосов
8ответов
30337 просмотров

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 ?

15
голосов
2ответов
6795 просмотров

PHP error logging does not work via .htaccess

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_A...

0
голосов
2ответов
457 просмотров

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?

4
голосов
3ответов
12492 просмотров

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); } ...

13
голосов
8ответов
20703 просмотров

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...

4
голосов
4ответов
211 просмотров

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 de...

9
голосов
1ответов
1042 просмотров

Suppressing 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. Fai...

6
голосов
3ответов
2702 просмотров

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.logg...

0
голосов
1ответов
756 просмотров

LogParser failing in WebApp

I've developed a WinForms app that I've that shows the bandwidth a single IIS site using LogParser. This worked quite well. I've now written the exact same thing in ASP.net, but then the following exception is thrown: Cannot find any file matching "C:\inetpub\logs\LogFiles\W3SVC4\ex*.log" The e...

2
голосов
2ответов
3297 просмотров

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 ...

3
голосов
3ответов
3092 просмотров

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...

0
голосов
1ответов
49 просмотров

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 p...

2
голосов
1ответов
2537 просмотров

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...

4
голосов
2ответов
8105 просмотров

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.

10
голосов
1ответов
6031 просмотров

How do I lock the console across threads in C#.NET?

I have a logger class that handles various information display with pretty colors (yay.). However, since it writes to the console in separated steps (i.e. set color to red, write text, set color to gray, write text, for something that would render "[Error] Description..." with the error being in ...

5
голосов
1ответов
6518 просмотров

How to prevent log file truncation with python logging module?

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: loggin...

1
голосов
6ответов
3909 просмотров

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.

27
голосов
4ответов
17655 просмотров

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.