For additional guidance, check out our community articles detailing the process of migrating from your current platform to Carbonio CE.
log4j is a logging framework written in Java, it is also used by Zimbra as the log manager for java processes. In this article, we will take a look at using and configuring log4j for Zimbra, its categories, and outputs.
Zimbra log4j configuration
Zimbra log4j records the log files in the local file system, although it can be modified. The configurations are stored in
/opt/zimbra/conf/log4j.properties.in. There is also another configuration file in
/opt/zimbra/conf/log4j.properties for temporary changes that are overridden by
log4j.properties.in file every time you restart mailboxd service.
To make any changes in the configuration file
- Go to
- Make your preferred changes.
- Restart mailboxd service by
For example, this is the default zimbra.sync entry in
by modifying INFO to TRACE
the changes will be permanent.
But if for example, you change log settings for a single user via zmprov
zmprov addAccountLogger email@example.com zimbra.soap debug
with restarting the mailboxd service, the changes are reset since the account-level log settings are temporary and stored in
For more information, you can run these commands
zmprov help log
zmprov help misc
Zimbra log4j categories
To find information on Zimbra log4j categories use
zmprov help log
This is the list of Zimbra log4j categories
|Backup and restore
|In-memory cache operations
|Database connection tracing
|Server extension loading
|EWS operations – ZCS 8.5+
|IMAP protocol operations
|File system operations
|LMTP operations (incoming mail)
|General mailbox operations
|Changes to the mailbox state
|POP protocol operations
|Redo log operations
|User session tracking
|SMTP operations (outgoing mail)
|Mail store disk operations
|Sync client operations
|Start-up/shutdown and other system messages
To facilitate finding problems, it is advised to enable DEBUG level logging of appropriate categories. To do so use
For example, to enable DEBUG for the zimbra.mailbox category
Zimbra log4j levels
The default logging levels are INFO, WARN, ERROR, and FATAL. You can also turn on the DEBUG or TRACE log levels.
|Designates very severe error events that the application to abort or impact a large number of users. For example, being unable to contact the MySQL database.
|Designates error events that might still allow the application to continue running or impact a single user. For example, a single mailbox having a corrupt index or being unable to delete a message from a mailbox.
|Designates potentially harmful situations but are usually recoverable or can be ignored. For example, user log in failed.
|Designates information messages that highlight the progress of the application, basic transaction-level logging. For example, server start-ups, mailbox creation/deletion, account creation.
|Events that would generally be useful to help a customer debug problems.
Zimbra log4j output
Log output is stored in the /opt/zimbra/log/mailbox.log file by an appender. It is possible to configure the log4j configuration file in a way that it stores the log output to other predefined or even to user-defined appenders. For example,
makes the appender LOGFILE to direct output from the
log4j.logger.zimbra category to be written to
/opt/zimbra/log/mailbox.log. By changing the appender it causes the category to stop writing and to begin writing to the new location. It is also possible to use multiple appenders. For example,
log4j.logger.zimbra=INFO, LOGFILE, SYSLOG
log4j.logger.zimbra category to write logging events to LOGFILE and SYSLOG appenders.