logging

How to add an error logger to a class.

Hi, I would like to use a generic error msg handler so I can GetLastError and SetError easily for any class. I came up with this scheme. But I have a couple of questions. Please note this implementation is just for testing. But I want to get the basic design right. #include <iostream> #include <stdarg.h> class ErrorHandler { p...

Does Event logger in C# needs admin privileges to write logs into Windows Event Viewer?

Hi, In my C# application I am using EventLog class to log messages. It works perfectly fine on my machine but doesnt really works on client machine. Client machine configuration is different than my machine. My machine has Vista OS whereas client has Windows 2003 OS. I have admin rights on my machine whereas on client machine my appl...

How to log efficiently with configurations?

I am using Spring framework in my application and it is deployed on MULE server. Based on debug or info level, the amount of logging and the percentage of logging will vary. Till date, I write the log statements explicitly in all my business logic. Is there any way to do this through configuration, say configure at some point - CLAS...

Logging in someone else's code

Hi I have just begun working on a C# application (using log4net). I'm supposed to add logs to code written by someone else. Hence, it's not possible for me to understand well the context each time (too much code, too less time :) ). I have been following a convention which seems quite crude. I display log level, datetime, class name, m...

[VB.net] What's the best approach to logging?

Hi all, My (local, windows/mono) app logs important events to a text file. In case of a sudden crash/failure/forced exit, no data should remain unwritten (as far as it's possible). Thus I currently use a simple append-to-text-file approach: Public Shared Sub LogAppEvent(ByVal EventData As String) Dim Config As ConfigHandler = Confi...

Logs queue in multithreaded application which dump information to DB (server side application)?

Could you advise me how to implements queue in multithreaded application. I have to register events in my application in queue (events from all users) which I flush and save to database every 100 events to improve performance. I don't want save database log for every single user commit. I suppose commit e.x. every 100 events to databas...

your challenges with using splunk

Hi all, In our application, we log critical information to log text files for later debugging purpose. With splunk its easy to identify a problem if I already have some data points like order number or "object reference not found" type of error. But its challending for me to get an overall picture of a problem using splunk. To be able t...

Log4j Logging with JBOSS5

Hello everyone, I am using log4j as logging framework in my application and JBOSS 5 as Application server. I have created a log4j.properties file in the src folder of the application. That's how my log4j.properties looks like: #Default log level to ERROR. Other levels are INFO and DEBUG. log4j.rootLogger=INFO, ROOT log4j.appender.ROOT...

Anyone have a tool to detect python logger statements with an invalid number of arguments?

e.g. if you have code that does something like this somewhere in your codebase: >>> import logging >>> logging.basicConfig() >>> logger = logging.getLogger(__name__) >>> logger.critical("foo: %s", 1, 2) Traceback (most recent call last): File "/pluto/local/lib/python2.6/logging/__init__.py", line 768, in emit msg = self.format(rec...

What is Amazon S3's logging client-id?

Can anyone comment on how Amazon S3 tracks for its client-id that it logs via HTTP? Assume it sets cookies and matches to a surrogate numeric ID for reporting? http://docs.amazonwebservices.com/AmazonCloudFront/latest/DeveloperGuide/index.html?AccessLogs.html ...

laptop-usb adapter emulates a keyboard and mouse

. I have a keyboard that does macro's (comfortkeyboard) and it's convenient to remember long passwords; but it doesn't have an SD card for backup; and, that brand of keyboard is too expensive . . to replace it, some adapter device (or fully software solution and a cable hack?) should connect a laptop's {ethernet, usb} to another computer...

Should I reuse a FileStream/BinaryWriter object?

Update: After looking in the event log at around the time this occurred, I get the message: "The server was unable to allocate from the system nonpaged pool because the pool was empty." repeated continually throughout the log, until it was rebooted. I am writing a class that writes debugging information to a file, up until now the class...

How can I print the full stack trace with GlassFish?

I have a GlassFish web application which throws errors (listed below) to the webbrowser. But my problem is that I can't see the full stack trace. I think I have to know what the real problem is. How can I change the length of the stack trace? javax.ejb.EJBException at com.sun.ejb.containers.BaseContainer.processSystemException(BaseCont...

Who can one separate static from dynamic requests with Nginx + Passenger

I would like to separate the request for static files from those handled by passenger. In Nginx one can log per "location" as far as I know, and that works fine for me. I have a global log and log per server. However I would also like to separate my logs based on request that are handled by passenger and those that are statically serve...

How to change Rails 3.0's default log path?

I have to change my rail application's default log path because of my company's internal software deployment process: basically my rails app ends up on a read-only location, and I need the log files written in a directory "made for this". With Rails 2.x we used to add some black magic in our FCGI script to force that in when deployed on...

How to handle uncaught exception from slot in Qt Jambi?

Sometimes, the Jambi framework code calls some of my code - for example, when I've connected a button's clicked signal to my own slot, and the button gets clicked. Now, if my code then throws an exception, Jambi swallows that exception and prints it to the console. I'd like to handle the exception manually (because I want to write it to...

Where does Microsoft hide the TraceDmp tool/source?

This link on MSDN says it's stored in the samples directory of the Windows SDK: http://msdn.microsoft.com/en-us/library/aa363805(VS.85).aspx Except it isn't, and I have the latest version. Where can one go to find this code, if not the distributable tool itself? ...

Are there any ELMAH-style exception logging components for non-http applications?

ELMAH is purpose-built for logging exceptions in ASP.Net, which is fine, but it does leave a lot of people (myself included) wanting to solve the same all-encompassing exception logging/viewing problem for non-web applications. Do you know of any open source components for general purpose exception logging and reporting in the vein of E...

Logging from EJB module in JavaEE, maven configuration

I have tried for hours to get my project working but the EJB part is still failing with a java.lang.ClassNotFoundException: org.slf4j.LoggerFactory (I want to output some log in my EJB). The layout of the project is the following: |-- nnWeb-ear | |-- pom.xml | `-- src | `-- main | |-- application | | `-...

Accesing, Merging IIS extended log files

I need to access, merge and parse my log files using my asp.net application programmatically. I use shared hosting and as I can see log files are out of the root directory of my website? Is there anyway to access those files from my application? ...