Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to perform logging through log4j2

    I'm trying to update our product to use log4j2 as a logging facility.
    From what I've been reading, SmartGWT supports log4j and slf4j.

    How do I get SmartGWT to perform logging through log4j2? This is what I have done so far:
    1. Include the slf4j.api library
    2. Set the following properties to get SmartGWT to stop looking for log4j library and configuration file:
    -DiscUseSlf4j=true
    -DiscUseLog4jConfig=false

    This allows everything to execute. What I'm missing is the actual logging from SmartGWT. How do I configure SmartGWT logging level, file, etc. to perform the actual logging?
    The code executed in the datasource constructor classes perform logging, but things like com.isomorphic.datasource.DSResponse, com.isomorphic.datasource.DSRequest, and com.isomorphic.sql.SQLDataSource do not (the items that are configured via the log4j.isc.config when log4j is used).

    #2
    There's nothing further to do on the SmartGWT side. You now want to configure everything via log4j2's config file.

    Comment

    Working...
    X