log

objective-c logging best practices

I am writing my first objective-c daemon type process that works in the background. Everything it does needs to be logged properly. I am fairly new to Apple stuff so I am not sure, what is the most common and/or best way to log activity? Does everyone simply log to a text file in their own special format, or use some sort of system call...

Which Git commit stats are easy to pull

Previously I have enjoyed TortoiseSvn's ability to generate simple commit stats for a given SVN repository. I wonder what is available in Git and am particularly interested in : Number of commits per user Number of lines changed per user activity over time (for instance aggregated weekly changes) Any ideas? ...

How do I lock the console across threads in C#.NET?

Hello :) I have a logger class that handles various information display with pretty colors (yay.). However, since it writes to the console in separated steps (i.e. set color to red, write text, set color to gray, write text, for something that would render "[Error] Description..." with the error being in red), but I have a multithreaded...

LogParser failing in WebApp

Hello, I've developed a WinForms app that I've that shows the bandwidth a single IIS site using LogParser. This worked quite well. I've now written the exact same thing in ASP.net, but then the following exception is thrown: Cannot find any file matching "C:\inetpub\logs\LogFiles\W3SVC4\ex*.log" The exception makes sence, since all ou...

How do I find the revision that changed a line in my code using TortoiseSvn?

I have one line of code which seems commented. Basically the thing I want to find is the revision that changed this line in the code. So, is it possible to see changes in code related to a specific keyword in TortoiseSvn Log? ...

mysql binary log only log deletes

Hi, Is there any way in MySQL to only log deletes? I tried using the mysql binary log option but unfortunately, there are too many inserts to my database and the file swells instantly. If I let it grow for more than a day or so it will take up all the room on the server. I just want to log deletes for disaster recovery purposes. Any ...

How can I display rsync progress from a log file without the carriage returns?

I have a log file from rsync command with progress on. When running this progress updates the display information on the same line. When I capture the output from this command I get a file that displays normally with cat on a terminal (all the backspaces and re-edits are replayed) but I want to be able to use grep on the file and proc...

How does one configure PHPUnit to log to the test database?

Hi All I am trying to work out how to configure PHPUnit to use the "test database" that is described on this wiki page: http://www.phpunit.de/wiki/TestDatabase However I can't find any documentation on how to enable and configure it. Has Anyone got any ideas? Thanks ...

Add lines at the end of file

Hi, I would like to add logs at the end of a file for each event, and create a new one when its size up to 255 Mo. For example, the current file could be /var/log/foo.2: /var/log/foo.0.log (full log file) /var/log/foo.1.log (full log file) /var/log/foo.2.log Have you got an idea of C source to do so? Thank you ...

Getting a log of the SQL SubSonic is using

Linq2SQL has the great Log property to see what the actual SQL statements that it is generating. Does SubSonic 2.2 have something similar to this? ...

parse log file - using java and plot graph

I am writing a log analyzer program which is supposed to plot a graph on search string against time after parsing log file(s). I am currently clueless about how would I parse and store the log file so that it could be processed to create multiple outputs, now I am parsing the entire log file all the time and process to do this – any sugg...

How shall I format my logs?

I'm writing a piece of honeypot software that will have extensive logging of interactions with it, I plan to log in plaintext .log files. I have two questions, from someone who isn't too familiar with how servers log, firstly how shall I break up my log files, I'm assuming after running this for a month I don't want one big .log file, d...

scheduled task log to a file named after current date

i have a scheduled task running for every 30 mins in ubuntu. i'm writing the log to a file called sh_tsk.log and using >> so that it doesn't overwrite. But what i want is to separate logs using dates. i.e today's log should be in a file named after today's date and tomorrow's log should be in a file named after tomorrow's date. i know i ...

I want to add the date to my log file

Log files can get very big, very fast if you log wcf calls and messages. I want to split up the log files by date. I can write my own tracelistener but i prefer some constant in the log if that is possible. Something like this <sharedListener> <add initilizeDate="SomeLogFile{TODAY}.log" this would output a log file like this : SomeLo...

Is it possible to specify where JVM's crash dumps go?

We have a desktop application using JNI that occasionally causes the JVM to crash. Luckily the JVM produces a hs_err_pidXXXX.log file, which is quite useful in debugging such errors. However, it always seems to go to the current working directory, and it's annoying to dig it from there, since our other log files all go to a specific "log...

php Logging Issues

Code works fine, except for the fact that there is a problem here: //Log Events function logEvent($newinput) { if ($newinput !== NULL) { // Add a timestamp to the start of the $message $newinput = date("Y/m/d H:i:s").': '.$newinput; $fp = fopen('log.txt', 'w'); fwrite($fp, $newinput."\n"); fc...

Git view latest log message for specific file in remote repository

Hi, I'm using a local Git project repository, and have created a remote repository followed by pushing the contents of my local repository to the remote repository using the git push origin master command. I can now perform commits and other tasks just fine. What I'm trying to do now is retrieve the latest commit log message for a spec...

How to include session log file

[php] $filename = "./logs/".$_SESSION['uniqueID'].".php" ; // output 4b1e7b3489549.php $data = "bla..bla..\n"; $data = stripcslashes($data); /* Writing file configurations */ $buat = fopen($filename, "w+"); fwrite($buat, "$data"); fclose($buat); ?> [/php] Now whe i call the output file from $filename (record.php) f...

Zend_Log in application.ini

Hi, is there any example how to setup an instance of zend log from application.ini? I have only found an example for logging to an file, but i want to log into an SQLITE database table? Zend Log resource ...

Suppressing Cherrypy's output when runing unit tests using Nose.

Hello, I'm using cherrypy to implement a web server and I use nose to run my unit tests. However, there is a lot of debug noise that nose catches and prints to stdout, even when I use the --nologcapture, particularly cherrypy's logging messages. That makes the testing output quite difficult to read. I've thought that: def setUp(self):...