Differenze
Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.
Entrambe le parti precedenti la revisione Revisione precedente Prossima revisione | Revisione precedente | ||
gwusermanual:lo4j_properties [2019/11/12 13:34] giorgio.scali |
gwusermanual:lo4j_properties [2020/01/07 16:14] (versione attuale) giorgio.scali |
||
---|---|---|---|
Linea 3: | Linea 3: | ||
Si possono specificare, tra l'altro, Logging Level selettivamente e su quali file verranno salvati i log. | Si possono specificare, tra l'altro, Logging Level selettivamente e su quali file verranno salvati i log. | ||
- | Per una guida completa fare riferimento a quella ufficiale [https://logging.apache.org/log4j/2.x/manual/configuration.html#Additivity|qui]]. | + | Per una guida completa fare riferimento a quella ufficiale [[https://logging.apache.org/log4j/2.x/manual/configuration.html|qui]]. |
===== Logging Level ===== | ===== Logging Level ===== | ||
- | In ordine crescente dal meno al più restrittivo: | + | Impostando un logging level, si avrà come effetto quello di visualizzare loggati solo i messaggi di pari livello o superiore. |
- | * ALL All levels including custom levels. | + | Ecco la lista dei logging level, in ordine crescente dal meno al più restrittivo: |
- | * DEBUG Designates fine-grained informational events that are most useful to debug an application. | + | * **ALL** All levels including custom levels. |
- | * INFO Designates informational messages that highlight the progress of the application at coarse-grained level. | + | * **DEBUG** Designates fine-grained informational events that are most useful to debug an application. |
- | * WARN Designates potentially harmful situations. | + | * **INFO** Designates informational messages that highlight the progress of the application at coarse-grained level. |
- | * ERROR Designates error events that might still allow the application to continue running. | + | * **WARN** Designates potentially harmful situations. |
- | * FATAL Designates very severe error events that will presumably lead the application to abort. | + | * **ERROR** Designates error events that might still allow the application to continue running. |
- | Altri supporti: | + | * **FATAL** Designates very severe error events that will presumably lead the application to abort. |
- | * OFF The highest possible rank and is intended to turn off logging. | + | * **OFF** The highest possible rank and is intended to turn off logging. |
- | * TRACE Designates finer-grained informational events than the DEBUG. | + | Altri: |
+ | * **TRACE** Designates finer-grained informational events than the DEBUG. | ||
+ | Per quanto riguarda in Geoweb, è buona prassi impostare il logging level a DEBUG in fase di sviluppo/dispiegamento in ambiente di test/collaudo, ed ad WARN od ERROR in produzione. | ||
- | Per quanto riguarda in geoweb, si dovrebbe impostare il logging level a DEBUG in fase di collaudo, ed ad INFO o ERROR in produzione. | + | Log generati da librerie di terze parti, come Activti e MongoDB vengono in genere tenuti sempre con logging level più restrittivi, come ERROR, a meno di specifiche necessità di debugging. |
- | + | ||
- | Log generati da librerie di terze parti, come Activti e MongoDB vengono in genere tenuti con logging level più restrittivi, come ERROR, a meno di specifiche necessità di debugging. | + | |
I log relativi al GwMailService sono in genere configurati per essere loggati su un file separato. | I log relativi al GwMailService sono in genere configurati per essere loggati su un file separato. | ||
Linea 27: | Linea 27: | ||
===== Template log4j.properties (Webclient) ===== | ===== Template log4j.properties (Webclient) ===== | ||
- | <code> | + | <code properties log4j.properties> |
# Set root logger level to DEBUG and its appenders to A1 and file | # Set root logger level to DEBUG and its appenders to A1 and file | ||
# A1 and file are arbitrary alias names for specific appender, configured below | # A1 and file are arbitrary alias names for specific appender, configured below | ||
Linea 33: | Linea 33: | ||
log4j.logger.com.geowebframework=DEBUG, A1, file | log4j.logger.com.geowebframework=DEBUG, A1, file | ||
+ | |||
+ | #Avoid multiple log rows | ||
+ | log4j.additivity.com.geowebframework=false | ||
#Mitigates Activiti logs applying ERROR log level | #Mitigates Activiti logs applying ERROR log level | ||
Linea 85: | Linea 88: | ||
===== Template log4j.properties (Webadmin) ===== | ===== Template log4j.properties (Webadmin) ===== | ||
- | <code> | + | <code properties log4j.properties> |
# Set root logger level to DEBUG and its appenders to A1 and file | # Set root logger level to DEBUG and its appenders to A1 and file | ||
# A1 and file are arbitrary alias names for specific appender, configured below | # A1 and file are arbitrary alias names for specific appender, configured below | ||
Linea 91: | Linea 94: | ||
log4j.logger.com.geowebframework=DEBUG, A1, file | log4j.logger.com.geowebframework=DEBUG, A1, file | ||
+ | |||
+ | #Avoid multiple log rows | ||
+ | log4j.additivity.com.geowebframework=false | ||
#Mitigates Activiti logs applying ERROR log level | #Mitigates Activiti logs applying ERROR log level |