logging

Logging an invalid login

Using the Login control in ASP.NET... The Login.Authenticate event is used to authenticate the credentials. The Login.LoginError event is called when there are invalid credentials. There is an appSetting to toggle the logging invalid logins. Any preference as to where to do that logging? In Authenticate, where credentials are checked...

How can I use a Postgres Triggers to store changes

Is it possible using postgres and triggers to create update and insert sql statements of changes that have happened to a table and log them to a file for later execution. This is only to be used temporally so just something quick and dirty. Regards, /James ...

How can I get timestamps in Perl DBI logfiles?

I have an issue where an application is randomly dying during a DBI call. We cannot reliably reproduce this in our test or acceptance environment, so I am required to monitor it on our production system to try to figure out what is happening. I am logging all the DBI traffic via the DBI_TRACE environment variable. DBI_TRACE=3=dbi.log s...

Postgres Query Logging for Windows

I have an application which is based on a Postgres database and I need to be able to examine the requests the application sends of the database. I want to have Postgres log all of the queries it receives somewhere that I can examine them in order to rebuild some of its functionality in another application. Can someone recommend a simpl...

How to safely write to a log file from two instances of the same application?

I have an application which can only have 1 instance running at each time, however if a 2nd instance is launched it needs to be logged to a common logfile that the first could also be using. I have the check for how many instances are running and I was planning on simply logging it to the event logger initially but the application can ...

Log4j encoding problem

I configured log4j SMTPAppender to send emails to me on errors. It works, but I have problem with non ASCII data. Configuration uses HTMLLayout and their documentation states: Appenders using this layout should have their encoding set to UTF-8 or UTF-16, otherwise events containing non ASCII characters could result in corrupted log fil...

Python logging SMTPHandler - handling offline SMTP server

I have setup the logging module for my new python script. I have two handlers, one sending stuff to a file, and one for email alerts. The SMTPHandler is setup to mail anything at the ERROR level or above. Everything works great, unless the SMTP connection fails. If the SMTP server does not respond or authentication fails (it requires...

Suppressing / controlling logging in org.apache.xmlrpc.XmlRpcClient?

I have inherited some Java code that does some testing of our XMLRPC server. So far so good. Part of that code deals with stopping the server (a few repetitions of "check if server still there and if so send it command to shut down"). As the server is shutting down, some of these "is the server still there?" and/or "tell it to shut dow...

Java: How to get a class object of the current class from a static context?

I have a logging function that takes the calling object as a parameter. I then call getClass().getSimpleName() on it so that I can easily get the class name to add to my log entry for easy reference. The problem is that when I call my log function from a static method, I can't pass in "this". My log function looks something like this:...

Log all function invocations to console

It occurs pretty often that I start debugging a class by logging every function call to console and looking for differences in the bugged cases. Is there some attribute that I can apply to a class to enable such a tracing? It's pretty exhausting to have to enter these Console.WriteLine("classname: methodname") to every method and to r...

Which design pattern would you consider when Logging is needed?

An application I'm working on requires logging of actions, user who performs the action, and time of action to a database. Which design pattern is most popular/appropriate for logging? I'm thinking of Command pattern that require the current user and an action. Perform the action and write to the log. What do you think? Any other ...

Logging framework being injected into classes

Should a logging framework be injected into classes that need them or should every class that needs it just know the framework and use it directly? I am using Log4Net and currently I am injecting a service that wraps that framework into the classes that need to be able to log, knowing logging is probably not going to change and that mos...

Jetty: How to write to access logs

Hi all, In my Java servlet code, I want to be able to programatically write to the jetty access log. I am aware that jetty will automatically log every incoming HTTP request to the access log. However, my servlet needs to occasionally append it's own line to the access log. Has anyone here done something similar? Thanks! ...

Logging configuration for certain EJB Jar on JBoss Server

Hi, can you specify on JBoss server logging level for single EJB Jar? I've got two EJB Jars with two different Web Services. I would like the WS logs from first jar to be printed completely to server log file whereas WS logs from second jar are irrevelant and i don't want them printed anywhere. Can it be configured on JBoss? I'm using ...

configuring log4net with xml file

Hi I tried to configure log4net for logging everything to the console output. I have a config file nameed Log4Net.config <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /> </configSections> <log4net> <appender...

How to separate Enterprise Logging file in EventType?

I have a log Mysite.log Is possible to automatically separate in Mysite.error.log, Mysite.debug.log, Mysite.warning.log? Depending of TraceEventType? ...

.Net 3.5 Logging

I'm a pretty new C# programmer. I was wondering if someone can fill me in with more information on how to use a logging Framework into a already existing solution (if that's what you call it). I am trying to get logging for my Project i am doing. I was wondering what good & easy frameworks there are and how are they supposed to be imple...

Compare Logging Application Block in Enterprise Library versus Log4net?

Can somebody please compare these two logging mechanism? ...

Where does the log file locate in a web application with log4j?

With the following settings: log4j.appender.file=org.apache.log4j.RollingFileAppender log4j.appender.file.maxFileSize=100KB log4j.appender.file.maxBackupIndex=5 log4j.appender.file.File=test.log log4j.appender.file.threshold=info log4j.appender.file.layout=org.apache.log4j.PatternLayout log4j.appender.file.layout.ConversionPattern=%d{AB...

Common practices if we discover a problem after deploying a web application?

I recently have a problem that my java code works perfectly ok on my local machine, however it just wouldn't work when I deploy it onto the web server, especially the DB part. The worst part is that the server is not my machine. So I had to come back and forth to check the versions of softwares, the db accounts, the settings, and so on.....