This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamic default log levels for each environment

 
Kiran Kumar
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • 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
 
Paul Clapham
Sheriff
Pie
Posts: 20966
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • 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
  • 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
Sheriff
Pie
Posts: 20966
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
I wonder if there any tools to do that..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic