Overview
Fess outputs multiple log files to record system operation status and error information. Proper log configuration facilitates troubleshooting and system monitoring.
Log File Types
Main Log Files
The main log files output by Fess are as follows:
Log File Locations
For ZIP installation:
For RPM/DEB packages:
Checking Logs During Troubleshooting
When problems occur, check logs using the following procedure:
Identify Error Type
Application errors →
fess.logCrawl errors →
fess_crawler.logAuthentication errors →
audit.logServer errors →
server_?.log
Check Latest Errors
Search for Specific Errors
Check Error Context
Check logs before and after error occurrence to identify causes.
Log Level Configuration
About Log Levels
Log levels control the detail of logs to output.
| Level | Description |
|---|---|
FATAL | Fatal errors (application cannot continue) |
ERROR | Errors (some functionality does not work) |
WARN | Warnings (potential issues) |
INFO | Information (important events) |
DEBUG | Debug information (detailed operation logs) |
TRACE | Trace information (most detailed) |
Recommended Log Levels
| Environment | Recommended Level | Reason |
|---|---|---|
| Production | WARN | Prioritize performance and disk space |
| Staging | INFO | Record important events |
| Development | DEBUG | Need detailed debug information |
| Problem Investigation | DEBUG or TRACE | Temporarily enable detailed logs |
Changing from Administration Screen
The easiest method is changing from the administration screen.
Log in to the administration screen.
Select “General” from the “System” menu.
Select the desired level in “Log Level”.
Click the “Update” button.
Note
Changes made from the administration screen are retained after Fess restart.
Changing via Configuration File
For more detailed log configuration, edit the Log4j2 configuration file.
Configuration File Location
ZIP installation:
app/WEB-INF/classes/log4j2.xmlRPM/DEB packages:
/etc/fess/log4j2.xml
Basic Configuration Examples
Default log level:
Example: Change to DEBUG level
Example: Change log level for specific package
Warning
DEBUG and TRACE levels output large amounts of logs. Do not use in production environments as it affects disk space and performance.
Configuration via Environment Variables
You can also specify log level at system startup.
Crawler Log Configuration
Crawler logs are output at INFO level by default.
Configuration from Administration Screen
Open the target crawl configuration from the “Crawler” menu in the administration screen.
Select “Script” in the “Settings” tab.
Add the following to the script field.
Configurable values:
FATALERRORWARNINFODEBUGTRACE
Change Log Level for Specific URL Patterns Only
Change Log Level for Entire Crawler Process
Configure in fess_config.properties:
Log Rotation
Overview
Log files grow over time, so periodic rotation (generation management) is necessary.
Automatic Rotation with Log4j2
Fess automatically performs log rotation using Log4j2’s RollingFileAppender.
Default Configuration
File Size: Rotate when exceeding 10MB
Generations to Keep: Maximum 10 files
Configuration file example (log4j2.xml):
Daily Rotation Configuration
For daily rotation instead of size-based:
Compression Configuration
For automatic compression during rotation:
Rotation with logrotate
In Linux environments, you can also manage log rotation using logrotate.
Example of /etc/logrotate.d/fess:
Configuration explanation:
daily: Daily rotationrotate 14: Keep 14 generationscompress: Compress old logsdelaycompress: Don’t compress one generation back (application may be writing)missingok: Don’t error if log file is missingnotifempty: Don’t rotate empty log filescreate 0644 fess fess: New log file permissions and owner
Log Monitoring
In production environments, it is recommended to monitor log files for early error detection.
Log Patterns to Monitor
Important Error Patterns
ERROR,FATALlevel logsOutOfMemoryErrorConnection refusedTimeoutExceptioncircuit_breaker_exceptionToo many open files
Patterns to Warn On
Frequent
WARNlevel logsRetryingSlow queryQueue full
Real-Time Monitoring
Real-time monitoring with tail command:
Simultaneous monitoring of multiple log files:
Monitoring Tool Examples
Logwatch
Periodic log file analysis and reporting.
Logstash + OpenSearch + OpenSearch Dashboards
Real-time log analysis and visualization.
Fluentd
Log collection and forwarding.
Prometheus + Grafana
Metrics monitoring and alerting.
Alert Configuration
Example notification on error detection:
Log Format
Default Format
Fess default log format:
Explanation of each element:
%d{ISO8601}: Timestamp (ISO8601 format)[%t]: Thread name%-5p: Log level (5 character width, left-aligned)%c: Logger name (package name)%m: Message%n: Newline
Custom Format Examples
JSON Format Log Output
Include More Detailed Information
Additional information:
%c{1.}: Abbreviated package name%F: File name%L: Line number
Performance Impact
Log output affects disk I/O and performance.
Best Practices
Use WARN level or higher in production
Avoid outputting unnecessary detailed logs.
Regularly clean up log files
Delete or compress old log files.
Use asynchronous log output
Use Log4j2’s asynchronous appender to reduce log output overhead.
Ensure adequate disk space
Secure sufficient disk space for log files.
Choose appropriate log level
Set log level appropriate for the environment.
Performance Measurement
Measure log output impact:
Troubleshooting
Logs Not Being Output
Causes and Solutions:
Log Directory Permissions
Disk Space
Log4j2 Configuration File
Check SELinux
Log Files Become Too Large
Adjust Log Level
Set to
WARNor higher.Check Log Rotation Configuration
Disable Unnecessary Log Output
Temporary Measures
Cannot Find Specific Logs
Check Log Level
If log level is too low, logs won’t be output.
Check Log File Path
Check Timestamp
Verify that system time is correct.
Log Buffering
Logs may not be written immediately.
Logs Have Character Encoding Issues
Encoding Configuration
Specify character encoding in
log4j2.xml:Environment Variable Configuration
References
Memory Configuration - Memory Configuration
Advanced Crawler Configuration - Advanced Crawler Configuration
Index Management - Index Backup