MetOffice / dm-dps-wmo-codes-registry

WMO Codes Registry Configuration
Apache License 2.0
1 stars 3 forks source link

improved logging #6

Closed marqh closed 8 years ago

marqh commented 8 years ago

The ability to identify issues from system logs needs improvement.

Specifically,

  1. reduce the level of redundant log messages (especially from template lookup),
  2. improve transaction identification
  3. improve formatting for core log messages
marqh commented 8 years ago

an example of a log message which it would be good to understand is this one:

SEVERE: The web application [] created a ThreadLocal with key of type 
[com.hp.hpl.jena.tdb.transaction.DatasetGraphTransaction.ThreadLocalBoolean] (value 
[com.hp.hpl.jena.tdb.transaction.DatasetGraphTransaction$ThreadLocalBoolean@462f9b0c]) and a value 
of type [java.lang.Boolean] (value [false]) but failed to remove it when the web application was stopped. 
Threads are going to be renewed over time to try and avoid a probable memory leak.

which is commonly reported at tomcat shutdown, but which does not appear to be functionally damaging (to me)

der commented 8 years ago

Addressed (1) by suppressing the separate velocity logging (unless explicitly configured) but actual errors still get through to the main log.

The ThreadLocalBoolean message is harmless. TDB uses a thread local to track transaction state per thread but it is light weight. There may be a way to force a clean up at termination but it doesn't represent any serious memory leak and tomcat's precautionary thread renewal is more than enough to deal with it.

marqh commented 8 years ago

fixed and tested on test.wmocodes.info