logging

PHP: User Login System / Check if User has acess to a page

Hello guys. This is a bit noob question but.. Its happens sometimes to everybody. I never worked with $_SESSION so once i need a login system i've used Dreamweaver to do one for me. I have a page where he asks for user name and password. And if loggin successful its goes to other page. Else it says in the login page. The problem its t...

email log file, generated by Java WebLogic Application Server

does this requirement conform to the J2EE Standards? is there a easy way to implement this, log file gets generated by Log4J and in the end I will access the file system and email the whole file(s). can I access the file system? ...

In log4j, does checking isDebugEnabled before logging improve performance?

I am using Log4J in my application for logging. Previously I was using debug call like: Option 1: logger.debug("some debug text"); but some links suggest that it is better to check isDebugEnabled() first, like: Option 2: boolean debugEnabled = logger.isDebugEnabled(); if (debugEnabled) { logger.debug("some debug text"); } So...

How do I log to file on the Mac (similar to log4net)

For my Mac app I'd like to create a log file on disk similar to those produced by log4net windows side. Things I'd like include a date stamp, logging levels (Debug, Info, Warning, Error), etc, and I'd prefer not to have to roll my own from scratch. Both VMWare fusion and JollysFastVNC do something similar to what I'm looking for, albeit...

What information should I be logging in my web app?

I finishing up a web application and I'm trying to implement some logging. I've never seen any good examples of what to log. Is it just exceptions? Are there other things I should be logging? What type of information do you find useful for finding and fixing bugs. Looking for some specific guidance and best practices. Thanks Follow up...

Which log4j facade to choose?

Essentially I'm looking for something with the same behavior, configuration, logging levels as log4j, but with some of the missing functionality (e.g. formatted logging — see here and here for related SO threads.) Current nominees are slf4j and log5j. ...

List of browser as the are listed in IIS logs

Greetings, I am looking for a list of browser entries as they are listed in an IIS log to help identify the different versions of browsers which visit our sites. Perhaps there isn't a list but an algorithm which should be used to identify different browsers and their versions. Please note that I am not looking for a log analyzer, but...

Does logback support log4j appenders?

Can custom appenders created for log4j (extending AppenderSkeleton) be used with new logback framework? I know that logback comes with its own set of appenders similar to log4j, but is this possible to re-use existing ones? How? ...

Log4j for Message Driven Beans

So, here's my problem: I have a message driven bean X and would like to make use of Logger in X's onMessage() method. Lets presume that I have a single instance of the bean running in my app server, hence, I would initialize log4j in ejbCreate(). This would mean I would have to do something like this: public void ejbCreate() { Pr...

redirecting sys.stdout to python logging

Hi, So right now we have a lot of python scripts and we are trying to consolidate them and fix and redundancies. One of the things we are trying to do, is to ensure that all sys.stdout/sys.stderr goes into the python logging module. Now the main thing is, we want the following printed out: [<ERROR LEVEL>] | <TIME> | <WHERE> | <MSG> ...

Why is Logging going in an infinite Loop?

I have the following code: #!/usr/bin/env python import logging import sys import copy class Wrapper: def write(self, s): #sys.__stdout__.write(s) loggy = logging.getLogger('foobar') loggy.info(s) def blah(): logger = logging.getLogger('foobar') logger.setLevel(logging.DEBUG) streamhandle = logg...

Logging in Scala

What is a good way to do logging in a Scala application? Something that is consistent with the language philosophy, does not clutter the code, and is low-maintenance and unobtrusive. Here's a basic requirement list: simple does not clutter the code. Scala is great for its brevity. I don't want half of my code to be logging statements l...

Is it worth wrapping a logging framework in an additional layer?

I'm currently looking at upgrading the logging mechanism in a medium-to-large-sized Java codebase. Messages are currently logged using static methods on a Debug class, and I have recommended switching from this to something like SLF4J or commons-logging. The application architect prefers that I encapsulate the dependency on SLF4J (possi...

Truncating a file while it's being used (Linux)

I have a process that's writing a lot of data to stdout, which I'm redirecting to a log file. I'd like to limit the size of the file by occasionally copying the current file to a new name and truncating it. My usual techniques of truncating a file, like cp /dev/null file don't work, presumably because the process is using it. Is th...

how to set the EventId and Category on Event viewer

hi, i use the class EventLogInstaller and register the MessageResourceFile whcihe i created i see in the registry that the source is exist but still when i send the message using EventLog the eventId is there with error from OS i also wanted to use the log4net but in this case icant set the category any help will be good 1...

Something is wrong with Log4Net?

I've been using Log4Net on a few high traffic websites for a couple of years, and I cannot say that I am a happy customer. So, wanted to see if anybody else has the same concerns: The CPU overhead with RollingFileAppendor is massive. Some of my websites need to trace 5-10GB per day, and when I enable logging, the CPU utilization more t...

How to enable FINE logging for a single java class

I'm using java.util.logging.Logger logging in my program. How do I enable FINE logging for a single class, while setting it to WARNING for every other class? I'd prefer to do this programatically in my main() method rather than needing to set up additional properties files. ...

Trace Listeners in ASP.NET

I have a library assembly that outputs trace information, and a client winforms application that adds a trace listener via app.config. If I were to use the library in ASP.NET, not configured for System.Diagnostics tracing, how could I 'catch' the trace output? Bonus question: Can I do something with Elmah to catch and log this info? O...

How to regulate the amount of printouts generated by a logging instruction produces over time?

How can I limit a program log printouts to a maximum of X printouts within Y seconds? Programming server side with java.util.logging, my code has a lot of info, warning, and error statements like: s_logger.logp(Level.WARNING, myClassName, myMethodName, "msg.code.in.properties.file"); On the one hand, I do want to see the warning messa...

Log in one place versus multiple logs

For a web app or a standalone server app, which would you recommend, and why? have the giant application.log, where everything is logged; have many smaller logs: security.log performance.log lifecycle.log integration.log ...