Josh Wild

Greenhorn
+ Follow
since May 27, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Josh Wild

....setting the root appender again will mean your previous settings will have no effect.



That means if you set the root appender again in code, you will not get traces logged to desired log file anyway unless you manually add a new FileAppender instance to root.
When log4j starts it displays messages like

".....setting property file to 'xxxx'"
"Adding appender 'stdout' to appender 'root'" etc

To see these messages, your log4j configuration must have been started in "debug" mode. I can see from your config file that you are already doing that.

You must look out for the destination where 'File' attribute is being set. Also figure out if you are accidentally setting the root appender programatically (after log4j has started) because setting the root appender again will mean your previous settings will have no effect.


If you can move to NCR and wish to work on some serious Java programming in Finance then you can write to me. I may be of some help.

...cheer up, you have not done anything wrong. There are only few people who take such brave steps for the good of their careers.
16 years ago
Nice analysis where dollar will end up due to present crisis --> http://www.marketskeptics.com/2009/01/ten-major-threats-facing-dollar.html
16 years ago
.. And yes you will then be able to track log in, log out and other system events.. See there is a well designed structure of events... Each standard event like system login or logout has an event code. Once you are able to expose the low level Windows events to Java, you can access all sorts of information regarding an event.

The event code for 'System Login' is '6009' by the way
16 years ago
You will have to use JNI. No standard Java API right now provides you this sort of feature to query the event log. Win32 SDK provides all features for system access. The API to read event log is there. You need to use that API from your JNI code.

Its a 2 step process:

1. Writing Java interfaces which make use of events, event categories (Application, System, Error etc) exposed in Java
2. Interface methods mapped to native JNI mehotds (native methods to be implemented in C++ or C using Win 32 SDK)


To carry out these steps you may have to study :

1. How JNI works
2. The Win 32 SDK API for EventLog

* While programming for EventLogs, you wll find lots of other interesting APIS like Performance counters, Windows Registry,.... .. Its actually very tempting
16 years ago
In addition to increasing heap size, you can try increasing "perm size", a memory area which sits next to the heap. All the binary code of currently running classes is archived in the �perm� area.

The �perm� area is important if your application or any of the third party jar files you use dynamically generate classes. For example: �perm� space is consumed when XSLT templates are dynamically compiled into classes, J2EE
application servers, JasperReports, JAXB etc use Java reflection to dynamically generate classes and/or large amount of classes in your application.

To increase perm space:

Java -XX:PermSize=256M -XX:MaxPermSize=256M or make an appropriate change in catalina.bat
16 years ago