Log4J in AS/400 - log4j

I am looking for a logging mechanism in AS/400 similar to log4j. I am thinking of writing a wrapper to the log4j in AS/400. Can someone please let me know if there is such a tool present already?
Thanks,
Sam

There are already apenders so I supect the rest should already be done. See here:http://log4j400.sourceforge.net/

I am not sure if it is what you want, but the iSeries performance and system tools can gather a lot of information about your programs. You won't see the source statement, but you do see the calls to the diffent components. These tools are part of the operating system. You just need much autorisation to use them.

Related

Why does Windows allow DLL Injection (but Linux doesn't)?

There are plenty of articles online that describe how DLL Injection works and what it can be used for. There has been lots of software written (both malicious and non) to use this functionality, but there's a question that I can't find the answer to with my Google-Fu and that is...why does Windows have/allow such a technique but Linux (and its ilk) do not?
LD_PRELOAD doesn't count as it doesn't allow runtime injection. I also know about injectso but that's not official.
What problem is DLL Injection supposed to solve, and since Linux doesn't have this functionality, how does it solve that problem? If possible please provide references to backup your answer, ideally first-party ones. Thank you.

WPP tracing for linux

I'm looking for a way to output traces to a log file in my code, which runs on linux.
I don't want to include the printing information in the binary, in every place I deploy it.
It windows, I simply used WPP to trace without putting the actual traces strings in my binary.
How can this by achieved in Linux?
I'm not very familiar with Linux tools in this area, so maybe there is a better system. However, since nobody else has made any good suggestions, I'll make a suggestion. (Probably not a very good suggestion, but the best I can think of right now.)
In theory, you could continue to use wpp. Wpp is simply a template system. It scans the configuration and input files to create data structures. Then it runs a template, fills in the data values it got from the scan, producing the tmh files. You could create a new set of templates that would use Linux apis instead of Windows apis, and would record the message strings in a way that works with some other log decoder system.
I noticed this question only now and would like to add my two cents to the story just for a case. Personally, I truly appreciate Windows WPP Tracing and consider it probably the best engineering solution for practical development troubleshooting among similar tools.
It happened I extended WPP use to Unix-like platforms twice. We wanted to use strong sides of WPP concept in general and yet use it in a multi-platform pieces of code. This was not a porting but rather a wrapper to specific WPP use we configured on Windows. One time we had a web service to perform actual WPP pre-processing on Windows; it may sound a bit insane but it worked fine and effective within the local network. A wrapper script that was executed before each compilation sent a web request, got a processed file and post-processed the generated include file to make it suitable for Unix-like platforms. The second time we implemented a simplified WPP pre-processor of our own (we found yet additional use for it - we could generate the tracing statements differently for production and unit testing, for example). This was a harsh solution: you anyway need to use some physical tracing framework behind the wrapper on non-Windows platform (well, the first time we apparently implemented our own lower level).
I do not think the Linux world has a framework comparable to WPP. Once I even thought it could be a great idea to make an open source porting project for WPP. I am not sure it would be much requested though. I said it is a great engineering solution. But who wants to do dirty engineering work? Open source community prefer abstract object-oriented and generic solutions, streaming and less necessity in corresponding tools (WPP requires special management tools and OS support).Ease of code writing is the today's choice.
There could be Microsoft fault (or unwillingness) in the lack of WPP popularity too. They kept it as an internal framework that came out just by a case with Windows DDK because they have to offer some logging/tracing solution for driver developers. Nobody even noticed much that WPP is well suitable for the user-space code too. And WPP pre-processor for C#, for example, has never been exposed to public at all.
Nevertheless, I still think that WPP porting to Unix/Linux work can be a challenging, interesting and maybe even useful attempt. If someone decides to lead it. :)

Vala and PolicyKit

I'm creating a simple GTK+ based application in Vala, which should be able to write into system directories, so it needs root access. I realize that giving full root access is a bad idea, so I need a way to gain temporary privileges.
In theory, the PolicyKit D-Bus service is the tool for the job, but I have no idea how to use it, let alone in Vala code. Any insight would be appreciated.
update:
I have done some further digging. My starting point was this. So basically what I need is finding out how to adapt these solutions to PolicyKit. For this, it is necessary to find the D-Bus interface of PolicyKit. I found it here. (Strangely I didn't find it in my local /usr/share/dbus-1/interfaces folder.) But now I have no idea how to continue.
The polkit Reference Manual contains some good information, including a high-level overview on writing polkit applications.
Instead of using the D-Bus interface directly, you should probably consider using the libpolkit-gobject-1 library. You can use the GIR directly, or generate a VAPI (which I would recommend) with vapigen. Here is one I just generated. I'm not really familiar with the API, but it is very easy to use a C API reference as a reference to figure out the Vala API.

Agile java development identifiying some logging method and monitoring thread execution

I need a way to find which Java methods are writing a plain log file (this log it's not log4j), I'm certain that the log is written as a text file with the io.file class.
How can I isolate the methods with Eclipse that operate with the log.
I made some investigation on Linux to determine the process that opens the file and it's jboss, so it's the main project, what now is needed is to narrow down the search.
So, what can it be done at this point ?
Any other tips like using 3-rd party monitoring tools like jvisualvm to monitor jboss's threads are welcomed.
I can provide more details about my problem, leave the questions in the comments, because I don't know very well how to explain the issue I'm experiencing.

Examples of products/libraries that use log4net

This isn't exactly a technical question, but I figured folks here might be a good resource. I'm preparing a presentation about log4net and I'd like to cite some well known products/projects/libraries that have incorporated log4net. Part of this is motivated to let the audience know how well established the tool is and the other is to demonstrate how the output from referenced assemblies can be incorporated into the logging output of your application.
I know nHibernate and StructureMap use it, but I'd like to really bury the slide in names/logos of applications that use log4net.
Thanks in advance for any ideas.
CruiseControl.Net uses log4net...
I used to have an Acer laptop and at least some of the Acer supplied utilities (called something like Acer Empowering Technology tools) used it.
Don't have access to the laptop now, but I did google search for 'acer empowering log4net' just to check my memory wasn't faulty.
If you are just looking for logos, then the first link that came up in the search http://www.exe-dll.com/dll/log4net.dll.htm also shows some other possible users including LinkSys, Motorola
One thing I find appealing about log4net is that it is related to log4j, the original one of the pair. This means that since I understand how to configure log4j, I also know how to configure log4net. The log4j package is used extensively in the java world. Oracle's Weblogic is a good example, and you can likely find more out there.
I believe this is a very appealing attribute, as there is more to this world than MS applications.

Resources