Tuesday, August 10, 2010

controlling logback configuration in standalone app

Application end-users must have the ability to change the logback logging level applied to all of the DK code, without having to explode the application jar.

Logback looks for a config file named logback.xml on the classpath. So first we copy a new logback.xml file into cwd and try setting the classpath on the command line:

java -cp . -jar diffkit-app.jar

No joy.

But this works: 

java -Dlogback.configurationFile=./logback.xml -jar diffkit-app.jar
Simple enough.

Also, logback can find the logback.xml file embedded in the application jar if the System property is defined this way:

java -Dlogback.configurationFile=conf/logback.xml -jar diffkit-app.jar

In this case, logback treats the property value as a classpath resource specification.

63 comments:

  1. There are lots of information about latest technology and how to get trained in them, like Oracle Training in Chennai have spread around the web, but this is a unique one according to me. The strategy you have updated here will make me to get trained in future technologies(Oracle Course in Chennai). By the way you are running a great blog. Thanks for sharing this.

    ReplyDelete
    Replies
    1. Hibernate Online Training Hibernate Online Training Hibernate Training in Chennai Hibernate Training in Chennai Java Online Training Java Online Training

      Hibernate Training Institutes in ChennaiHibernate Training Institutes in Chennai Java Online Training Java Online Training Java Online Training Java Online Training

      Delete
    2. Java Training Institutes Java Training Institutes Java EE Training in Chennai Java EE Training in Chennai Java Spring Hibernate Training Institutes in Chennai J2EE Training Institutes in Chennai J2EE Training Institutes in Chennai Core Java Training Institutes in Chennai Core Java Training Institutes in Chennai

      Delete
  2. Your blog is awesome..You have clearly aboutcontrolling logback configuration in standalone app...Its very useful for me to know about new things..Keep on blogging..
    Java training in chennai





    ReplyDelete
  3. Very nice post. Thanks for sharing such a useful post.

    wordpress Training in Chennai

    ReplyDelete
  4. hi..really you have post an informative blog.it will be really helpful to many peoples.
    apachespark training

    ReplyDelete
  5. This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
    Android Training in Chennai
    Ios Training in Chennai

    ReplyDelete
  6. There are so many useful information in your post, I like it all the time. And I want to share this improve app store ranking with you,you can take a look. This is very useful.

    ReplyDelete
  7. Thanks to shared this informative details with us. Keep updating.

    DBA course syllabus | DBA training courses

    ReplyDelete
  8. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.

    Java Training in Bangalore

    ReplyDelete
  9. Thanks a lot very much for the high your blog post quality and results-oriented help. I won’t think twice to endorse to anybody who wants and needs support about this area.
    java training in chennai

    ReplyDelete
  10. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
    google-cloud-platform-training-in-chennai

    ReplyDelete
  11. This comment has been removed by the author.

    ReplyDelete
  12. Appreciation for really being thoughtful and also for deciding on certain marvelous guides most people really want to be aware of.
    amazon-web-services-training-institute-in-chennai

    ReplyDelete
  13. The blog or and best that is extremely useful to keep I can share the ideas of the future as this is really what I was looking for, I am very comfortable and pleased to come here. Thank you very much.

    Digital Marketing Course in Chennai
    Digital Marketing Training in Chennai
    Online Digital Marketing Training
    SEO Training in Chennai
    Digital Marketing Course
    Digital Marketing Training
    Digital Marketing Courses

    ReplyDelete
  14. Wonderful blog & good post.Its really helpful for me, awaiting for more new post. Keep Blogging!
    Web Design Training

    ReplyDelete
  15. It has been just unfathomably liberal with you to give straightforwardly what precisely numerous people would've promoted for an eBook to wind up making some money for their end, basically given that you could have attempted it in the occasion you needed.
    safety courses in chennai

    ReplyDelete
  16. nice blog check out https://www.ayevainstitute.com/

    ReplyDelete
  17. Thanks for sharing this unique information with us. Your post is really awesome. Your blog is really helpful for me..
    Top college in Jaipur|law college|law college in Jaipur|Best law college in Jaipur

    ReplyDelete
  18. Thanks for sharing this unique information with us. Your post is really awesome. Your blog is really helpful for me..
    organic oil
    organic oil in jaipur
    organic cold pressed oils
    ayurvedic oil store in jaipur

    ReplyDelete
  19. I wish to indicate because of you only to bail me out of this specific trouble. As a consequence of checking through the net and meeting systems that were not beneficial, I thought my life was finished.
    nebosh course in chennai

    ReplyDelete
  20. Online casino is a new generation of games for good people. successful roulette casino Knowing what an online casino is, you are already better than others.

    ReplyDelete
  21. Thanks for the great information , i was looking for this information from long.Great blog
    tally course in hyderabad

    ReplyDelete
  22. I read your blog and i found innovative ideas in that.After a long time i had saw such kind of article.Thanks for you and i request
    you to update more in future.
    Loadrunner Training in Chennai
    French Classes in Chennai
    Android Training in Chennai
    Digital Marketing Course in Chennai
    JAVA Training in Chennai
    German Classes in Chennai
    JAVA Training in Adayar

    ReplyDelete
  23. Amazing article. Your blog helped me to improve myself in many ways thanks for sharing this kind of wonderful informative blogs in live. I have bookmarked more article from this website. Such a nice blog you are providing ! Kindly Visit Us @ Tours and Travels in Madurai | Best Travels in Madurai | Madurai Travels

    ReplyDelete
  24. Где найти профиль для лед ленты люди добрые помогите пожалуйста.

    ReplyDelete
  25. Nice post. Thanks for sharing! I want people to know just how good this information is in your article. It’s interesting content and Great work.
    Thanks & Regards,
    VRIT Professionals,
    No.1 Leading Web Designing Training Institute In Chennai.

    And also those who are looking for
    Web Designing Training Institute in Chennai
    Photoshop Training Institute in Chennai
    PHP & Mysql Training Institute in Chennai
    SEO Training Institute in Chennai
    Android Training Institute in Chennai

    ReplyDelete
  26. It is really a great work and the way in which you are sharing the knowledge is excellent. Thanks for your informative article.
    Artificial training Institution in Chennai | Artificial training in Chennai

    ReplyDelete