Solved

Writing to the Windows Event Log in Java

Posted on 2010-08-15
5
1,248 Views
Last Modified: 2012-05-10
I am designing a Java based utility which will run only on Windows servers.  Our corporate Support tool is, I'm told, really good at monitoring the Windows Event Log and I was asked that if possible, I have this Java utility write to the event log in case of errors, and indeed, completely as a good log that is monitored.  However, given this is Java which doesn't know about Windows as such, I'm wondering whether there is a reasonably simple and straightforward way to write to the Windows Event Log from a Java program.  Kind of defeats the purpose of Java really but I was asked to look into it.  Thanks.
0
Comment
Question by:lizmarc
  • 3
5 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 334 total points
ID: 33443617
You need to use a special appender available in log4j, or better, logback
0
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 334 total points
ID: 33443630
0
 
LVL 92

Assisted Solution

by:objects
objects earned 166 total points
ID: 33443632
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 33443733
:-)

(Don't use the Runtime solution suggested at the link btw)
0
 

Author Comment

by:lizmarc
ID: 33443763
Looks like the Log4J option is the best one, based on all the feedback.  Thanks.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JDeveloper 12c for 32 bit 4 84
nextBoolean(double p) for Random class 3 40
use lov values 2 49
servlet web applications   metadata-complete="true" or false 3 36
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now