logging

Python - How to check if a file is used by another application?

I want to open a file which is periodically written to by another application. This application cannot be modified. I'd therefore like to only open the file when I know it is not been written to by an other application. Is there a pythonic way to do this? Otherwise, how do I achieve this in Unix and Windows? edit: I'll try and clarify....

Overhead of log information in files

Hello, I am doing some long simulations that can take from several hours to several days and I am logging the information into files. The files can reach sizes of hundreds of Mb and inside there is just a list of numbers. I am really concern about the overhead that this is originating. I would like to ask if the overhead of using this m...

dumping c++ structures to a text file

Hi, how would one go about writing the contents of a structure in C++ to a text file? What I want to do is, say I have a structure called A, with data members A.one, A.two, and so on, and I want to write them out line by line into a text file, like so Structure A A.one = value A.two = value ... Structure B B.one = value B.two = value ...

Is a debugger the mother of all evil?

Some say that a debugger is the mother of all evil. What do you think of this approach? I have a friend at work, a colleague, who's completely against using a debugger whatsoever. I asked him: So, you just write code without bugs? Is that it? He answers: Of course not. Everyone makes mistakes, the difference is how you deal with them ...

Enterprise Library Logging filling the Event Viewer with ClearTrust trivia

Something's changed, and I cannot tell what. I have an IIS Web Farm platform with Dev, Test, QA and Prod environments. 7 servers in all. Dev, Test and Prod have all suddenly been overflowing with verbose security events from every website that uses RSA ClearTrust. The QA environment remains untouched. Something's changed. That much i...

Do you find java.util.logging sufficient?

Per the title, do you find the default Java logging framework sufficient for your needs? Do you use alternative logging services such as log4j or others? If so, why? I'd like to hear any advice you have regarding logging requirements in different types of projects, and when integrating frameworks is actually necessary and/or useful. ...

How to read debug info from IIS logs

I'm maintaining an old asp classic application. It uses Response.AppendToLog as its sole debug logging system. I only debug it on my localhost so the logging files are on my harddrive in the %SystemDrive%\inetpub\logs\LogFiles folder. I'm looking for a tail-like program that shows these debug messages live. Maybe with a possibility to ...

How to use rolling log using log4c?

Can someone tell me how I can use the rolling log feature of log4c API library. There is only documentation on functions it provides and there are so many if anyone has used rolling log with log4c , would be great to see how to configure it and use it. thanks. ...

Logging API for AS3

Hi there, quick question, I've been looking for a simple logging tool for AS3 projects (I do not want any Flex dependencies) and my impression so far has been that there is no actively developed project. What I need is basic logging, and adapters to allow me to send logging to file (using AIR and a LocalConnection maybe) and maybe send...

Logging Java web applications?

I am planning to implement logging into a web application that I am currently working on but I am struggling with some of the details. What is the best way to go about logging a Java web application? Specifically; Where does the configuration file go in .war package file? Where do people log to, relative or absolute path flat file, o...

Audit Logging Strategies

I am trying to decide on the best method for audit logging within my application. The main reason for the log is reporting the sequence of events (changes). I have a hierarchy of Objects, I need to create reports when something changes on any part of that hierarchy, at a latter date. I think that I have three options: Have a log for...

Registering each C/C++ source file to create a runtime list of used sources

For a debugging and logging library, I want to be able to find, at runtime, a list of all of the source files that the project has compiled and linked. I assume I'll be including some kind of header in each source file, and the preprocessor __FILE__ macro can give me a character constant for that file, so I just need to somehow "broadcas...

Logging vs. Debugging

Background: I've inherited a web application that is intended to create on-the-fly connections between local and remote equipment. There are a tremendous number of moving parts recently: the app itself has changed significantly; the development toolchain was just updated; and both the local and remote equipment have been "modified" to ...

What do you have in your log4net config? Hacks, optimizations, observations?

This is my log4net config file <?xml version="1.0" encoding="utf-8" ?> <log4net debug="true"> <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender" > <filter type="log4net.Filter.LevelRangeFilter"> <acceptOnMatch value="true" /> <levelMin value="DEBUG" /> <levelMax value="FATAL" /> </f...

Error Logging C++ Preprocessor Macros __LINE__, __FUNCTION__

I trying to incorporate a simple error logging into my existing app, at the moment it reports errors just using cout so i was hoping to keep a similar interface using the << operator. However i want it to log the line & function the error occurred. But i don't want to have to type __LINE__, __FUNCTION__ every time i need to log. Does any...

How to design log level names. To reflect frequency of use?

I'm going to build a great system. Thinking about log level naming make me wonder. Can I choose names, so the admin and the developers know which to use. Without using documentation? It would be good if the log level also reflect how frequent they will show up in logs. For example: INIT/SHUTDOWN - (appear once) FUNC_CALL - (ap...

Can I change the configuration of the Enterprise Library Logging block at runtime?

Without getting into the discussion of the merits or otherwise of the EntLib logging block, is there any way that I can change it's configuration at runtime? For example, I have the block configured to log General events to a flat file, and Critical events to the event log. Is there any way to change it to log General events to the cons...

How do I pipe the Java console output to a file?

I found a bug in an application that completely freezes the JVM. The produced stacktrace would provide valuable information for the developers and I would like to retrieve it from the Java console. When the JVM crashes, the console is frozen and I cannot copy the contained text anymore. Is there way to pipe the Java console directly to ...

multiple processes writing to a single log file

This is intended to be a lightweight generic solution, although the problem is currently with a IIS CGI application that needs to log the timeline of events (second resolution) for troible shooting a situation where a later request ends up in the MySQL database BEFORE the earlier request! So it boils down to a logging debug statements i...

Creating an encrypted log file

I am creating a client side application which needs to create a log of the user activity but for various reasons this log must not be human readable. Currently for my development I am creating a plain text log which looks something like this: 12/03/2009 08:34:21 -> User 'Bob' logged in 12/03/2009 08:34:28 -> Navigated to config page 12...