logging

How do I log response in Spring RestTemplate?

I am using RestTemplate to make calls to a web service. String userId = restTemplate.getForObject(createUserUrl, String.class); If this fails to return a user ID I just get returned null but I don't know why. How do I output the actual XML response to a log? ...

Logging inside Framework?

Hello,I am trying to develop small application for reset Logging on Phone. Can some one throw some Lights on how to achieve logging in AndriodRunTimeInit whenever there is exception? I want to write into file whenever there is RunTime exception. ...

Alternative login system with file upload

I was wondering whether a login system that implies that have to upload a certain file and then the server verifies that this is equal to the one stored in the server would be useful. I was thinking that to its advantage, it would have that the "password" (the file) could be quite large (without you having to remember it). Also it woul...

Is there a web log analyser that can understand processing time and parse querystring?

Does anyone know of an web log analyser that can both report on the 'processing time' field that Apache can store (%D), and also parse querystrings intelligently? I've looked into some of the usual suspects eg AWStats and Webalyser but none I've looked at seem to offer either of these features. Ideally, you'd be able to report on spec...

python subprocess with shell=True: redirections and platform-independent subprocess killing

Hi, I'm having a hard time getting what I want out of the python subprocess module (which supposed to an unified/platform-independent abstraction, afaik, but don't get me started on that :)). So the simple thing what I'm after is the following. I want to Launch an external (stdio) application (possibly with subprocess), where I use s...

MySQL-bin.XXX taking up extreme amounts of space in logs

We have recently deployed a Drupal 6 install and the directory storing the mysqld-bin.XXX files /var/run/mysqld has caused the mysql server to crash. The size of these files (log) are over 1g in size each and there are tons of them. I would like to know a way we can either enable log rotation or something similar to insure this does no...

How to make NSLog work with Python's logging module when using PyObjC?

I'm writing a Django-based webapp that imports a Cocoa framework via PyObjC. The Cocoa framework has NSLog() littered all through it and while I can see them when running the Django server in non-daemon mode, as soon as I go to daemon I simply lose all this useful NSLog() output. Is there any easy way to get NSLog stuff to bubble up in...

Logging username with Elmah for WCF Webservices

We are using the approach described here to log our webservice errors with Elmah. And this actually works, but sadly the username beeing logged is empty. We did some debugging and found, that when logging the error in the ErrorHandler the HttpContext.Current.User has the correct User set. We also tried: HttpContext context = HttpCont...

Fast data recording/logging on a separate thread in C#

Hello, We're developing an application which reads data from a number of external hardware devices continuously. The data rate is between 0.5MB - 10MB / sec, depending on the external hardware configuration. The reading of the external devices is currently being done on a BackgroundWorker. Trying to write the acquired data to disk with...

Passing a logger between classes

I have two classes in my project that I would like to pass the logger from the main class to the sub-class and have the sub-class utilise the parent's logger settings. The sub-class is a separate, generic class (i.e. not tied to the main class) and must be able to create it's own logger if there isn't one provided. The main class creat...

Should I use a logging framework with ASP.NET MVC 2?

I'm getting ready for my first ASP.NET MVC 2 project and was wondering whether ASP.NET Tracing is sufficient for any logging I might need to do. Is anyone using a logging framework like log4net or NLog with an ASP.NET MVC 2 application, and if so, what additional functionality does it provide that ASP.NET Tracing lacks? ...

Is there a way to wrap all JavaScript methods with a function?

I want to wrap every function call with some logging code. Something that would produce output like: func1(param1, param2) func2(param1) func3() func4(param1, param2) Ideally, I would like an API of the form: function globalBefore(func); function globalAfter(func); I've googled quite a bit for this, but it seems like there's only ...

java.util.logging: how to set level by logger package (or prefix)?

My app uses many libraries and I'm using java.util.logging for logging. I'd like to be able to set different logging levels for each library by doing something like: org.datanucleus.*.level = WARNING com.google.apphosting.*.level = WARNING com.myapp.*.level = FINE Is is possible? ...

logging in tomcat

Hi, i want to log for a web apps in tomcat6. The log file is located at /project/Log in ubuntu. I am using juli as the logger for my log and i have no logging.properties define. Instead, i just hardcode the handler and the path of the logger in a class called LogHelper. Here is the code of it: ` package de; import java.io.File; import j...

multithreaded logging for high performance application

I have an application (server application) that needs an extensive amount of logging implemented and shouldn't be too affected performance wise by enabling logging. The application has a thread pool of worker threads performing the work. Originally I was going to just log on these thread pool threads, but then I'd need to lock practica...

Why calling LoggerFactory.getLogger(...) every time is not recommended?

Hi all, I've read tons of posts and documents (on this site and elsewhere) pointing that the recommended pattern for SFL4J logging is: public class MyClass { final static Logger logger = LoggerFactory.getLogger(MyClass.class); public void myMethod() { //do some stuff logger.debug("blah blah blah"); } } My...

How to record all of the user's touches in iPhone app

note: This is an expansion (and clarification) of a question I asked yesterday. I am conducting a research project where I want to record all of the user's touches in the iPhone app. After the experiment, I will be able to download the data and process it in either Excel or (more likely) Matlab and determine how many times they clicked ...

Log message style guide

Can anyone recommend a best practice style guide for log messages? For example: What & when Conventions Style & Formatting Readability i.e. what makes a good / bad log message string EDIT: I'm particularly interested in what make a good log string - beyond including the TIME, SEVERITY and COMPONENT, as I tend to use log4j anyway ...

Despite my setting up my own logging.properties, everything still also logs to catalina.out. How to stop?

I am using Tomcat version 5.5.x. My WAR sets its own logging properties successfully and logs to $TOMCAT_HOME/logs/.YYYY-MM-DD.log. Everything that is written to my log is also written to catalina.out. Is there a way to stop the redundant logging to catalina.out stop? ...

What is a good enterprise wide logging + notification solution?

(Microsoft environment) I've been asked to look into replacing our current logging solution : MS Enterprise Library, with something else. We are trying to find something that is not just a "logging" solution, rather we would like to find something that would let us monitor the status of many processes taking place, not just capturing...