Eugeny N Dzhurinsky <[EMAIL PROTECTED]> writes:
>I'm using Log class in some of my business objects.
>I need to test these classes.
>But i don't want to show debug info with the System.out.println etc. I
>want to use Log class as it defined by turbine.
>The logging service is initialized during turbine servlet statup, but when
>testing i can't to perform startup of turbine servoce, so logging service
>is not initialized too. And i'm getting error
>org.apache.turbine.services.InstantiationException: ServiceBroker: unknown
>service LoggingService requested
Which turbine are you using? 2.2 or the CVS? If you're using the CVS,
I did check some information about how to do this post-2.2 with
commons-logging into the CVS on saturday/sunday.
In a nutshell. You forget about the Logging Service, and get a log
object like this:
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
private Log log = LogFactory.getLog("your.logger.facility");
and use log.debug("xxx"); // Please not the lowercase "l" on log
Then you configure your.logger.facility using Log4j.properties
Regards
Henning
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH [EMAIL PROTECTED]
Am Schwabachgrund 22 Fon.: 09131 / 50654-0 [EMAIL PROTECTED]
D-91054 Buckenhof Fax.: 09131 / 50654-20
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>