How to use logging in zimlet libraries, particularly with SLF4J?

Have a great idea for extending Zimbra? Share ideas, ask questions, contribute, and get feedback.
gumkins
Posts: 1
Joined: Thu Jul 27, 2017 8:21 am

How to use logging in zimlet libraries, particularly with SLF4J?

Postby gumkins » Thu Jul 27, 2017 8:38 am

I'm using SLF4J facade in my library, which is deployed to ~zimbra/jetty/webapps/zimlet/WEB-INF/lib/ and is referenced from a zimlet jsp file.
It is configured with log4j.properties, where I specified two appenders - log file and stdout.

Problem #1
The log file is not created.

Problem #2
It was expected that stdout appender will print to ~zimbra/log/zmmailboxd.out, but nothing found there.

I've also tried to use jul and log4j directly, as result messages logged via jul appears in zmmailboxd.out.

This doesn't solve my problem because I can't use a specific logging library in my shared library, I want to use SLF4J and logs to be written by logger implementation which is used in the destination application/module.


Return to “Developers”

Who is online

Users browsing this forum: No registered users and 6 guests