logging

Best location for exception log files (Windows)

The question where exception logs should go has been discussed here once or twice (or more), and one of the recommendation was that the application should never write to the installation folder. However, if I put the logs somewhere in %appdata%, this means that each user has its own set of logs. I'd prefer having all logs at a single loc...

How to specifiy common application data folder for log4net?

I want log4net to write log files (using RollingFileAppender) to a subfolder of the common application data folder (e.g. C:\Documents and Settings\All Users\Application Data\Company\Product\Logs). However, on Win XP, there is no environment variable that specifies this folder. We have %ALLUSERSPROFILE%, we have %APPDATA%, but there is no...

How do I create an automatic UI event trace in winforms?

I need to take an existing winforms application and drop into an event tracing mode, with hopefully as little friction as possible. I would like to see every action the user takes as a simple stack trace-looking thing: MainForm.LaunchThing_Click ThingWindow.NameInput_Focus ThingWindow.NameInput_TextChanged ThingWindow.AddressInput_Focu...

java.util.logging.Logger doesn't respect java.util.logging.Level ?

In plain JSE 6 environment: Logger l = Logger.getLogger("nameless"); l.setLevel(Level.ALL); l.fine("somemessage"); Nothing shows up in Eclipse console. l.info("") and above works just fine, but anything below fine just doesn't seem to work. What's could be wrong? TIA. ...

Is it possible to get a subversion client log file?

At the moment, we have a problem that exists only for a few subversion clients. We would like to get a subversion client log file, which contains information what command was send to the server, what response came back and so on. Is there the possibility to switch on logging to get that information on the client? I found tons of informa...

Find a way in the java logging frameworks scene.

Hey to all Java has a lot of frameworks / APIs that help you do logging in your application: The Java API has java.util.logging package. Apache's Log4j. Apache's Commons Logging. SLF4J (logging Facade). jLo. and many many more... I've always used the log4j library, i found it sufficient most of the time, and extensible when i needed...

unobtrusive loggers in c#

Hi guys, I'm rolling my own logger class, and want to represent the heirarchy of logs as the app moves through different phases: log start loading loaded 400 values processing couldn't process var "x" etc. In C++ (yes I know), I'd use little classlets that pushed themselves on the log stack when created, and...

Tool or language to count occurrances of errors in a log file

I am trying to determine the best way to parse a log file and get a count of all of the errors in it by type. Currently, I open the log in a text editor, strip out the date and thread ID, then sort the file. This puts all errors together by type, which I can then count (using the count function in the editor, not manually). I am looki...

How to log SQL calls with NHibernate to the console of Visual Studio?

I have the following configuration file for NHibernate: <?xml version="1.0" encoding="utf-8" ?> <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> <session-factory> <property name="connection.connection_string">Server=.\SQLEXPRESS;Database=mydb;Integrated Security=True;</property> <property name="dialect">NHibe...

Windows Service running but event logs not working.

I have a windows service listening to messages from a queue but the messages are not read from the queue.I created an event log to check for logs during service startup and shutdown but the logs are not written. I do not want to debug the service since it is a painful process.Is there a way to solve this issue.The messages need to be rea...

ASP.NET MVC: Access logs

On an ASP.NET MVC website, what's the best way to implement access logging? I want to answer the following questions: What are the most popular pages? Which pages were accessed in the last 24 hours? etc. I could log in to the server using Remote Desktop and poke through the IIS logs myself (even using Microsoft Logfile Parser), but I...

IP Address Logging for Lots of Models in Existing Application

I have an existing app that has many, many models. I'd like to log the IP address of the user that created them with the primary purpose being a way to help weed out spammers or other abusive users (if I don't know what IP address(es) they are using, I can't block it). I would need to keep track of these over time as users may access fro...

How do I programmatically determine the location of the VB application log?

I'm retro-fitting an older vb.net application to bring it into compliance with LUA principles in Vista. Up until now, the application has used a hodgepodge of logging mechanisms, but the core one involved writing a log to c:\temp\ if the folder existed. I want to replace this current logging with a more standard logging mechanism. Thi...

Linux/c++ log rotation scheme

I have a logger system which basically is a fancy way of writing my data to std::clog in a thread safe way. I also, redirect std::clog to a file like this: int main() { std::ofstream logfile(config::logname, std::ios::app); std::streambuf *const old_buffer = std::clog.rdbuf(logfile.rdbuf()); // .. the guts of the applicat...

How to show the Logged Messages window in Xcode

Hello, I'm a very new Cocoa user and running into all sorts of problems... I'm trying to get the content of an Array and found this code to do this. NSLog(@"array : %@",collection); The problem is, I'm not getting any console or tracer window that shows this 'echo' Is there another command I should use, i've tried opening all wi...

How should I log from a non-root Debian Linux daemon?

I'm writing a new daemon, which will be hosted on Debian Linux. I've found that /var/log has root only write permissions, so my daemon cannot write log files there. However, if it writes there, it appears it will gain automatic log rotation, and also work as a user might expect. What is the recommended way for a daemon to write log en...

Different Log File For Specific Controller

I currently have a controller were I would like to keep track of logging in a separate log file, like: tracker.log. I currently get about 100,000 hits a day with this, and I would like to separate the log from all the other controllers so I can easily debug those as well as the tracker. I couldn't find anything for the Rails::Initializer...

Log analyzer for non-web-applications

Hi all, I have been searching for some kind of tool to analyse log files that are in custom format (my own format for my own program for example). There are many tools that are designed for web-traffic log analysing, but I haven't found suitable tools for custom log files. I'd be happy to find one where I can collect for example all th...

What is a the 'best practice' for location of windows service logfiles?

A lot of windows services write daily log files to their application installation directory under "program files". Windows system apps (eg IIS) use %SystemRoot%\System32\LogFiles. Is something I should do for my service? ...

My log file is too large

My log file in SQL Server used up all the space on my disk. I run full backups every night, but the log file keeps growing. What can I do? ...