Results 1 to 3 of 3

Thread: How to log into customized destination in SpringDM powered bundle ?

  1. #1
    Join Date
    Sep 2008
    Posts
    26

    Question How to log into customized destination in SpringDM powered bundle ?

    Hi,

    We're using the SLF4j logging api heavily and happily in our spring-dm powered project. not only for common information but also for those profiling information.

    Now we want to those performance related information to be stored into a seperated target, for example, a file, or even a message queue or db.

    Is it possible for me to customize the spring-dm's logging service to create a separated appender for some specific logging categories?

    Or any suggestions to achieve this ?

    Thanks !

  2. #2
    Join Date
    Oct 2008
    Posts
    493

    Default

    Hi, Shawn. This isn't possible in dm Server 1.0.x. It is, however, on the roadmap for dm Server 2.0.x: https://issuetracker.springsource.com/browse/DMS-23.
    Andy Wilkinson
    SpringSource

  3. #3
    Join Date
    Sep 2008
    Posts
    26

    Default

    Andy,

    Thanks for the information.

    Fortunately, I found a solution to that problem before 2.x come out.

    I can implement my own log service backed by the log4j or logback library, and override the SLF4j binding in each bundle that want to enjoy my own logging service. it works like a charm and all logging code are untouched.

    Idea borrow from http://blog.kornr.net/index.php/2008...t-all-together

    This solution is a little bit complicated(because that should be done by DM server: ), but additional benifit is, I can now swap the logging backend or change the log level dynamically.

    Hope that helps to other guys.
    Last edited by shawn.chain; Jun 8th, 2009 at 07:43 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •