web.xml
How to configure relative paths for Log4j using Spring
One of the most annoying problems of application deploying is how to correctly configure logging. In this article we'll see how Spring can help us in this area.
Absolute vs relative paths
The biggest issue of relative paths is that they must be manually modified for each application instance, thus requiring time and attention. Let's try to use relative paths instead.
Below you can see our first try, where we try to write on file (save this snippet in /WEB-INF/classes/log4j.properties):
- dimitri's blog
- Aggiungi un commento
- Leggi tutto
- 11077 letture
- Italian
Configurare path relativi per Log4j utilizzando Spring
Uno dei problemi più fastidiosi quando si esegue il deploy di una web application Java è la corretta configurazione del logging. In questo articolo vedremo come Spring ci può venire in aiuto.
Path assoluti vs path relativi
Il problema principale dei path assoluti è che vanno modificati per ogni installazione dell'applicazione, richiedendo tempo e attenzione. Proviamo allora a configurare la web application per utilizzare path relativi.
- dimitri's blog
- 8 commenti
- Leggi tutto
- 7819 letture
- English
