• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Dynamic default log levels for each environment

 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

It's a very common practice to have a different default logging level for different environments in your landscape, like DEBUG for Dev server, INFO for test and WARN for Production.

How can this be done? I don't want to edit the configuration file before deploying on to production server.

Thank you for your time,
Kiran
 
Marshal
Posts: 28425
102
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't really agree. The more similar your test environment is to your production environment, the fewer problems you will miss before deploying. So I think your development logging levels should be the same as your production logging levels, except when you are actively debugging something. Which should not be a frequent occurrence.
 
Kiran Kumar
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Paul,

We have a "production-like" environment too. In any case, I would like to know how this configuration change across the landscape maintained.

Thanks,
Kiran
 
Paul Clapham
Marshal
Posts: 28425
102
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want something to be different in two deployments of an application, and you don't want to make last-minute edits before deploying to achieve that, then it follows that the difference must be configured outside the application. How you achieve that depends on where you are deploying your application.

(I suppose I don't have much sympathy for your logging example because we use logging as part of our business rules. For example we might write an entry to the log file when we got the orders from customer ABCD. Then when we have a hypothetical dispute with customer ABCD, we can see when the orders came in and whether they were consistently late, or something like that. We rarely use logging as a debugging or development tool. But that doesn't do anything to answer your question.)
 
Kiran Kumar
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wonder if there any tools to do that..
 
reply
    Bookmark Topic Watch Topic
  • New Topic