Announcement Announcement Module
Collapse
No announcement yet.
Logging in War Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Logging in War

    I am trying to log in a war application within OSGI framework. I have been able to log in the web-app by manually configuring using JoranConfigurator using a separate logging.xml. However, I want to use the existing the logback framework built within the dm-server with the serviceability.xml. When I try the built-in approach and attempt to instantiate a slf4j logger using the following code

    org.slf4j.Logger slf4j = LoggerFactory.getLogger(getClass().getName());

    I get an error/exception upon deployment saying class not found. How can I leverage the existing the framework with it's logging config file and still be able to log using the slf4j? I have read The user-guide/programmer's on DM-SERVER and it has not helped.

    thanks

    Sonam
    Last edited by sonam; Mar 1st, 2010, 01:34 PM.

  • #2
    You will need to add Import-Package headers to you MANIFEST.MF

    Code:
    Import-Package: org.slf4j
    Make sure that logback, and slf4j are not included in WEB-INF/lib. Those libraries will be provisioned from dm-server for you.

    Do you deploy just a plain war or do you prepare your manifest.mf in any way for OSGi?

    Comment

    Working...
    X