Menu

An improvement to SLF4JLogger to extracting location information

Help
yylqinghao
2014-08-14
2014-08-18
  • yylqinghao

    yylqinghao - 2014-08-14

    I'm not familar with other loggers, but for SLF4J, there is another log interface named LocationAwareLogger in package org.slf4j.spi, this interface helps to integration with logging systems capable of extracting location information.

    I hope you can involve this interface in HA-JDBC's SLF4JLogger.

    When logging, make a jugement that if logger is an instance of LocationAwareLogger, if true, then use the LocationAwareLogger.log, set fqcn=SLF4JLogger.class.getName(). And more, you may have to override the AbstractLogger's log methods in SLF4JLogger, or you can set fqcn=AbstractLogger.class.getName() when the log methods in AbstractLogger is used.

    Can you make this improvement change into HA-JDBC?

     
  • Paul Ferraro

    Paul Ferraro - 2014-08-18

    Thanks for pointing this out. I'll look into it.

     

Log in to post a comment.