[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xmlblaster] Client startup and logging
David Hooker wrote:
java -Dproperty.verbose=0 -Djacorb.verbosity=0
You can hardcode those properties directly in your main()
The jacorb porperties you can adjust in
which will be automatically copied into xmlBlaster.jar on
your next compile.
for further informations,
I've been able to divert the normal xmlBlaster logging to my own logging
facility by making my own I_LogDeviceFactory. However, there are still
a couple of messages sent to System.out (apparently from within jutils)
that I couldn't suppress, so I "brute force" suppress them by
temporarily re-routing System.out. Here's my code:
ByteArrayOutputStream os = new ByteArrayOutputStream();
PrintStream tempOut = new PrintStream(os);
PrintStream origOut = System.out;
String args = new String;
args = "-LoggableDevicePlugin[console][1.0]";
Global global = new Global(args, true, false);
Also, this only works when I set the loadPropFile on the Global
constructor to true. If I set it to false, all the logging from the
xmlBlaster client code goes to System.out.
I'm still seeing messages on System.out from JACORB. Does anyone know
how I can suppress/re-route these?
From: David Hooker
Sent: Tuesday, April 01, 2003 4:00 PM
To: xmlblaster at server.xmlblaster.org
Subject: [xmlblaster] Client startup and logging
In my program, I've added the ability for it to subscribe to xmlBlaster.
What I haven't figured out yet is how to control the client-side
startup. I want to be able to set several properties from my code for
the xmlBlaster client before it starts.
One reason is that I want to capture all the logging and divert it into
my own log files. I've figured out the I_LogDeviceFactory and
associated classes, but I don't want to have to have a properties *file*
in order to use it. So where can I programaticaly set my logger to be
the ONLY log device used?
Another thing I noticed is that when I *do* use the properties file to
log to a file, like this:
... WARN messages are still printed to the console, even though I don't
have a console log device. Why is this? How can I turn that off?