Re: Howto define logging level depending on APPLICATION_ENV
My suggestion would be to customize the factory that builds the logging service so that it appends APPLICATION_ENV onto the name of the config section it reads Logging settings from. Then you could have Logging_development and Logging_production settings in your config.ini, and the code would read the appropriate version in the appropriate context.
Which version of VuFind are you using? If you give me the details, I can identify the relevant part of the code you would need to customize.
From: Jochen Riks [mailto:[hidden email]]
Sent: Thursday, March 16, 2017 8:36 AM
To: [hidden email] Subject: [VuFind-Tech] Howto define logging level depending on APPLICATION_ENV
I want to control the logging levels with the value of APPLICATION_ENV:
in our setup we have development, staging and production servers -- the production one is running with APPLICATION_ENV='production' and all others with APPLICATION_ENV='development'.
The value of APPLICATION_ENV is configured with an ENV value in the apache config because we don't want to have different vufind config files on the servers (controlled with git).
I found the logging is configured in (local/)config/vufind/config.ini where I can set the log level for each logging method.
What I want to have is the option to define that there will be different loglevels used for i.e. the method 'file' for production and development servers without using different config.ini files...
So, my question here is how to do that the best way?
Thanks and regards,
Stellv. Leiter des Dezernates Bibliotheks-IT Fachreferat Physik
Universitaets- und Landesbibliothek Duesseldorf Universitaetsstrasse 1, Geb. 24.41