Logging and 7.1 java api

2007-09-20 Thread Jarl Grøneng
Hi,

I have beed using log4j with my java code the last versions.

Start the logger like this:
private static Logger theLog = Logger.getLogger("no.steria.ars.Update");

However, with 7.1 java api I also get logging from
com.bmc.arsys.api.Config,
org.apache.commons.configuration.ConfigurationUtils,
com.bmc.arsys.api.ARTypeMgr, and so on.

How to get rid of these? And if I want these loglines, how do I set it
up so it logs a new line for every logline? Now it all comes on one
line like this:


'2007-09-20 21:18:40,411 [main] DEBUG
org.apache.commons.digester.Digester  -   No rules found matching
'configuration'.2007-09-20 21:18:40,411 [main] DEBUG
org.apache.commons.digester.Digester  -   Popping body text
''2007-09-20 21:18:40,411 [main] DEBUG
org.apache.commons.digester.Digester.sax  - endDocument()2007-09-20
21:18:40,599 [main] DEBUG com.bmc.arsys.api.ProxyJRpcBase  - Rpc
connection to itsm70 failed w reason : ONC/RPC program version
mismatch2007-09-20 21:18:40,740 [main] DEBUG
com.bmc.arsys.artranscode.ARCharSet  - serverLanguage =
NOR;WESTERN2007-09-20 21:18:40,755 [main] DEBUG
com.bmc.arsys.artranscode.ARCharSet  - svrCharSetJavaName =
windows-12522007-09-20 21:18:40,802 [main] INFO
com.bmc.arsys.api.ProxyManager  - Connects to ARServer itsm70 through
[EMAIL PROTECTED] 21:18:40,802 [main]
DEBUG com.bmc.arsys.api.Config  - getJniLoadMode2007-09-20
21:18:40,802 [main] INFO  com.bmc.arsys.api.Proxy  - Api source is
identified as: AP016561457016WSrgRgQbYDAAKQAA2007-09-20 21:18:41,147
[main] DEBUG com.bmc.arsys.arrpc.xdr.ArRpcPassword  -
ArControlStruct*.ArRpcPassword password string is encrypted.2007-09-20
21:18:41,194 [main] DEBUG com.bmc.arsys.utils.ProcessUtil  -


Is ther any in-depth documentation of the logging capability in version 7.1?

Regards,
Jarl

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the 
Answers Are"


Re: Logging and 7.1 java api

2007-09-20 Thread Jarl Grøneng
Seems like the log4j.xml was the solution.

Still missing documentation :-)

--
Jarl

On 9/20/07, Jarl Grøneng <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have beed using log4j with my java code the last versions.
>
> Start the logger like this:
> private static Logger theLog = Logger.getLogger("no.steria.ars.Update");
>
> However, with 7.1 java api I also get logging from
> com.bmc.arsys.api.Config,
> org.apache.commons.configuration.ConfigurationUtils,
> com.bmc.arsys.api.ARTypeMgr, and so on.
>
> How to get rid of these? And if I want these loglines, how do I set it
> up so it logs a new line for every logline? Now it all comes on one
> line like this:
>
>
> '2007-09-20 21:18:40,411 [main] DEBUG
> org.apache.commons.digester.Digester  -   No rules found matching
> 'configuration'.2007-09-20 21:18:40,411 [main] DEBUG
> org.apache.commons.digester.Digester  -   Popping body text
> ''2007-09-20 21:18:40,411 [main] DEBUG
> org.apache.commons.digester.Digester.sax  - endDocument()2007-09-20
> 21:18:40,599 [main] DEBUG com.bmc.arsys.api.ProxyJRpcBase  - Rpc
> connection to itsm70 failed w reason : ONC/RPC program version
> mismatch2007-09-20 21:18:40,740 [main] DEBUG
> com.bmc.arsys.artranscode.ARCharSet  - serverLanguage =
> NOR;WESTERN2007-09-20 21:18:40,755 [main] DEBUG
> com.bmc.arsys.artranscode.ARCharSet  - svrCharSetJavaName =
> windows-12522007-09-20 21:18:40,802 [main] INFO
> com.bmc.arsys.api.ProxyManager  - Connects to ARServer itsm70 through
> [EMAIL PROTECTED] 21:18:40,802 [main]
> DEBUG com.bmc.arsys.api.Config  - getJniLoadMode2007-09-20
> 21:18:40,802 [main] INFO  com.bmc.arsys.api.Proxy  - Api source is
> identified as: AP016561457016WSrgRgQbYDAAKQAA2007-09-20 21:18:41,147
> [main] DEBUG com.bmc.arsys.arrpc.xdr.ArRpcPassword  -
> ArControlStruct*.ArRpcPassword password string is encrypted.2007-09-20
> 21:18:41,194 [main] DEBUG com.bmc.arsys.utils.ProcessUtil  -
>
>
> Is ther any in-depth documentation of the logging capability in version 7.1?
>
> Regards,
> Jarl
>

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the 
Answers Are"


Re: Logging and 7.1 java api

2007-09-21 Thread Hugo Visser
The 7.1 API uses log4j for logging, in fact it forces it on you. I wish BMC
had taken more care when looking at the pile of dependencies. In stead of
using a heavyweight logging framework like log4j they could also have used
the standard java.util.logging. Even if you _do not_ want any logging for
your trivial API program, you'd still have to configure log4j either from
code or from a configuration file. If not, your API will spit out the
default "log4j is not initialized" message. Even if I did want logging
through log4j, I'm now tied to the version that BMC provides for their API,
which is a bad thing to me.

Anyway, you have to take a look at log4j configuration at
http://logging.apache.org/log4j/, there are various ways to configure
loggers, from code or from configuration.

Hugo

On 9/20/07, Jarl Grøneng <[EMAIL PROTECTED]> wrote:
>
> Seems like the log4j.xml was the solution.
>
> Still missing documentation :-)
>
> --
> Jarl
>
> On 9/20/07, Jarl Grøneng <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I have beed using log4j with my java code the last versions.
> >
> > Start the logger like this:
> > private static Logger theLog = Logger.getLogger("no.steria.ars.Update");
> >
> > However, with 7.1 java api I also get logging from
> > com.bmc.arsys.api.Config,
> > org.apache.commons.configuration.ConfigurationUtils,
> > com.bmc.arsys.api.ARTypeMgr, and so on.
> >
> > How to get rid of these? And if I want these loglines, how do I set it
> > up so it logs a new line for every logline? Now it all comes on one
> > line like this:
> >
> >
> > '2007-09-20 21:18:40,411 [main] DEBUG
> > org.apache.commons.digester.Digester  -   No rules found matching
> > 'configuration'.2007-09-20 21:18:40,411 [main] DEBUG
> > org.apache.commons.digester.Digester  -   Popping body text
> > ''2007-09-20 21:18:40,411 [main] DEBUG
> > org.apache.commons.digester.Digester.sax  - endDocument()2007-09-20
> > 21:18:40,599 [main] DEBUG com.bmc.arsys.api.ProxyJRpcBase  - Rpc
> > connection to itsm70 failed w reason : ONC/RPC program version
> > mismatch2007-09-20 21:18:40,740 [main] DEBUG
> > com.bmc.arsys.artranscode.ARCharSet  - serverLanguage =
> > NOR;WESTERN2007-09-20 21:18:40,755 [main] DEBUG
> > com.bmc.arsys.artranscode.ARCharSet  - svrCharSetJavaName =
> > windows-12522007-09-20 21:18:40,802 [main] INFO
> > com.bmc.arsys.api.ProxyManager  - Connects to ARServer itsm70 through
> > [EMAIL PROTECTED] 21:18:40,802 [main]
> > DEBUG com.bmc.arsys.api.Config  - getJniLoadMode2007-09-20
> > 21:18:40,802 [main] INFO  com.bmc.arsys.api.Proxy  - Api source is
> > identified as: AP016561457016WSrgRgQbYDAAKQAA2007-09-20 21:18:41,147
> > [main] DEBUG com.bmc.arsys.arrpc.xdr.ArRpcPassword  -
> > ArControlStruct*.ArRpcPassword password string is encrypted.2007-09-20
> > 21:18:41,194 [main] DEBUG com.bmc.arsys.utils.ProcessUtil  -
> >
> >
> > Is ther any in-depth documentation of the logging capability in version
> 7.1?
> >
> > Regards,
> > Jarl
> >
>
>
> ___
> UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where
> the Answers Are"
>

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the 
Answers Are"