[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Loggers...



On 06/27/2013 12:20 PM, Emmanuel LÃcharny wrote:
- First of all, and this is important, the code is currently using Log4j
as the logger. So far so good, but that means we will face some trouble
as soon as someone using a different logger will like to embed fortress.
We should use a facade instead (like SLF4j).

Agreed

On 06/27/2013 12:20 PM, Emmanuel LÃcharny wrote:
We include two libs : log4j-1.2.16 and commons-logging-1.1.1. I don't
know why we include the second one (their may be some needed dependency
on it...) but if we could just get rid of it, that would be great. (I'm
not even sure it's used at all...)
It's a runtime dependency being pulled in by commons configuration lib. Specifically this import:

import org.apache.commons.configuration.PropertiesConfiguration;

On 06/27/2013 12:20 PM, Emmanuel LÃcharny wrote:
- If we were to keep commons-logging, the updated version is 1.1.3
Will make that switch. Also will look into removing altogether. Must be a way to disentangle.

On 06/27/2013 12:20 PM, Emmanuel LÃcharny wrote:
- There is no need to specify the class name in front of each log like in :
             log.info( CLS_NM + " static init: found from: " + propFile +
" path:" + fUrl.getPath() );
  The log pattern can be used to store this information in the logs

Agreed

On 06/27/2013 12:20 PM, Emmanuel LÃcharny wrote:
- If we were to use slf4j, such logs will be written :
             log.info( "Static init: found from: {} path: {}", propFile,
fUrl.getPath() );
  which save us teh computation of the resulting String if the Info mode
is not set.

- For any end user code that uses Fortress, we could use Log4j-1.2 [1]
which has just been released recently. It offers pretty good
performances [2]

Those are just suggestions...

wdyt ?

[1] http://logging.apache.org/log4j/1.2/
[2] http://logging.apache.org/log4j/2.x/performance.html

I think you're right across the board.  Thanks

--
shawn.mckinney@jts.us is my new email address