Console & journald — STDOUT Logging and systemd Integration
In addition to file-based logging, MideyeServer writes log entries to the console (STDOUT). On Linux systems using systemd, console output is automatically captured by the systemd journal (journald), providing centralized access to logs from all services.
Key features:
- Real-time log streaming with
journalctl - Structured metadata (service unit, PID, priority)
- Automatic log rotation and retention
- Integration with systemd’s logging ecosystem
- Can be forwarded to remote syslog servers
Console appender configuration
Section titled “Console appender configuration”Default configuration
Section titled “Default configuration”<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <layout class="ch.qos.logback.classic.PatternLayout"> <Pattern> ${FILE_LOG_PATTERN} </Pattern> </layout></appender>
<!-- Attached at DEBUG level --><root level="DEBUG"> <appender-ref ref="STDOUT"/></root>Console output is included in the FILE root appender at INFO level (not a separate STDOUT root).
Log format
Section titled “Log format”Console output uses the same format as file logs:
%date{yyyy-MM-dd HH:mm:ss.SSSXXX, UTC} %-5level [%thread] %logger{0}: %msg%nViewing console logs
Section titled “Viewing console logs”Using journalctl (systemd)
Section titled “Using journalctl (systemd)”On Linux systems with systemd, view MideyeServer console output:
# View all MideyeServer logssudo journalctl -u mideyeserver6
# Follow logs in real-time (like tail -f)sudo journalctl -u mideyeserver6 -f
# Show only logs from todaysudo journalctl -u mideyeserver6 --since today
# Show logs from the last hoursudo journalctl -u mideyeserver6 --since "1 hour ago"
# Show logs since bootsudo journalctl -u mideyeserver6 -b
# Show only ERROR and highersudo journalctl -u mideyeserver6 -p err
# Last 100 linessudo journalctl -u mideyeserver6 -n 100
# Export to filesudo journalctl -u mideyeserver6 > mideyeserver-journal.logPriority levels
Section titled “Priority levels”journalctl priority filters:
| Priority | journalctl flag | Logback level |
|---|---|---|
emerg | -p 0 | N/A |
alert | -p 1 | N/A |
crit | -p 2 | N/A |
err | -p 3 | ERROR |
warning | -p 4 | WARN |
notice | -p 5 | N/A |
info | -p 6 | INFO |
debug | -p 7 | DEBUG |
Example: Show only WARN and ERROR:
sudo journalctl -u mideyeserver6 -p warningSearching logs
Section titled “Searching logs”# Search for specific textsudo journalctl -u mideyeserver6 | grep "Authentication failed"
# Case-insensitive searchsudo journalctl -u mideyeserver6 | grep -i "error"
# Search with context (3 lines before/after)sudo journalctl -u mideyeserver6 | grep -C 3 "NullPointerException"
# Filter by date rangesudo journalctl -u mideyeserver6 --since "2026-02-24" --until "2026-02-25"Viewing other service logs
Section titled “Viewing other service logs”# All systemd servicessudo journalctl
# All logs since last bootsudo journalctl -b
# Kernel messagessudo journalctl -k
# All ERROR messages from any servicesudo journalctl -p errJournal configuration
Section titled “Journal configuration”Journal storage
Section titled “Journal storage”By default, the systemd journal stores logs in /run/log/journal/ (volatile, cleared on reboot). To persist across reboots:
-
Check current storage mode
Terminal window sudo journalctl --header | grep "State" -
Enable persistent storage
Terminal window sudo mkdir -p /var/log/journalsudo systemctl restart systemd-journald -
Verify persistent storage
Terminal window sudo journalctl --verify
Retention and size limits
Section titled “Retention and size limits”Configure journal retention in /etc/systemd/journald.conf:
[Journal]# Store journal on diskStorage=persistent
# Limit total journal size to 1GBSystemMaxUse=1G
# Each journal file max 100MBSystemMaxFileSize=100M
# Keep journal data for 30 daysMaxRetentionSec=30d
# Keep at least 100MB free on diskSystemKeepFree=100MAfter editing, restart journald:
sudo systemctl restart systemd-journaldVerify settings
Section titled “Verify settings”# Show current journal disk usagesudo journalctl --disk-usage
# Vacuum old logs (force cleanup)sudo journalctl --vacuum-time=7d # Keep 7 dayssudo journalctl --vacuum-size=500M # Keep 500MB maxForwarding journal to remote syslog
Section titled “Forwarding journal to remote syslog”Forward all systemd journal entries (including MideyeServer) to a remote syslog server.
Method 1: journald ForwardToSyslog
Section titled “Method 1: journald ForwardToSyslog”[Journal]ForwardToSyslog=yesMaxLevelSyslog=infosudo systemctl restart systemd-journaldThis sends journal entries to the local syslog daemon (rsyslog/syslog-ng), which then forwards to remote servers using its own configuration (see Syslog).
Method 2: systemd-journal-remote
Section titled “Method 2: systemd-journal-remote”For direct journal-to-journal forwarding without syslog, use systemd-journal-remote.
On the receiving server:
sudo apt-get install systemd-journal-remotesudo systemctl enable systemd-journal-remote.socketsudo systemctl start systemd-journal-remote.socketsudo dnf install systemd-journal-remotesudo systemctl enable systemd-journal-remote.socketsudo systemctl start systemd-journal-remote.socketOn the MideyeServer host:
sudo apt-get install systemd-journal-uploadsudo dnf install systemd-journal-remoteConfigure the upload target:
sudo systemctl edit systemd-journal-upload.serviceAdd:
[Service]Environment="SYSTEMD_JOURNAL_UPLOAD_URL=http://remote-server:19532"sudo systemctl enable systemd-journal-uploadsudo systemctl start systemd-journal-uploadMethod 3: rsyslog imjournal module
Section titled “Method 3: rsyslog imjournal module”Configure rsyslog to read from the journal and forward:
# Load imjournal modulemodule(load="imjournal" StateFile="/var/spool/rsyslog/imjournal.state" RateLimit.Interval="10" RateLimit.Burst="30000")
# Forward all journal entries*.* @@remote-syslog.example.com:514sudo systemctl restart rsyslogThis is the most flexible approach for existing rsyslog infrastructure.
Disabling console appender
Section titled “Disabling console appender”If console logging is not needed (e.g., you only use file logs or forward files to aggregators), disable the STDOUT appender to reduce overhead.
Option 1: Remove appender reference
Section titled “Option 1: Remove appender reference”<!-- Comment out STDOUT root logger --><!--<root level="DEBUG"> <appender-ref ref="STDOUT"/></root>-->Option 2: Increase threshold
Section titled “Option 2: Increase threshold”Reduce verbosity by increasing the level:
<!-- Only log ERROR to console --><root level="ERROR"> <appender-ref ref="STDOUT"/></root>Option 3: Remove appender entirely
Section titled “Option 3: Remove appender entirely”Delete the <appender name="STDOUT"> block and all references to it.
Windows console logging
Section titled “Windows console logging”On Windows, console output is typically not visible unless running MideyeServer in non-service mode.
-
Stop the MideyeServer service
-
Run MideyeServer from command line
Terminal window cd "C:\Program Files (x86)\Mideye Server 6\bin"mideyeserver.exe --console -
View console logs in the terminal window
For service-based installations, use the file logs (mideyeserver.log) or Windows Event Log instead (see Windows Event Log).
Structured logging with journald
Section titled “Structured logging with journald”The systemd journal supports structured logging with key-value pairs. While MideyeServer’s default Logback configuration outputs plain text, the journal adds its own structured metadata.
View structured data:
sudo journalctl -u mideyeserver6 -o json-prettyExample output:
{ "MESSAGE": "Application 'MideyeServer' is running!", "PRIORITY": "6", "SYSLOG_FACILITY": "3", "SYSLOG_IDENTIFIER": "java", "_SYSTEMD_UNIT": "mideyeserver6.service", "_PID": "12345", "_HOSTNAME": "mideyeserver01"}Filter by structured fields:
# Show only logs from specific PIDsudo journalctl _PID=12345
# Show only from specific unitsudo journalctl _SYSTEMD_UNIT=mideyeserver6.serviceTroubleshooting
Section titled “Troubleshooting”No console output in journalctl
Section titled “No console output in journalctl”Check service configuration:
sudo systemctl status mideyeserver6Verify StandardOutput and StandardError are set to journal (or not set, which defaults to journal):
[Service]StandardOutput=journalStandardError=journalReload and restart:
sudo systemctl daemon-reloadsudo systemctl restart mideyeserver6Console appender not writing
Section titled “Console appender not writing”Look for errors in journal output:
sudo journalctl -u mideyeserver6 | grep -i "logback\|appender"Ensure <root> or specific loggers reference STDOUT:
<root level="INFO"> <appender-ref ref="STDOUT"/></root>Journal disk full
Section titled “Journal disk full”# Check disk usagesudo journalctl --disk-usage
# Vacuum old logssudo journalctl --vacuum-size=500Msudo journalctl --vacuum-time=7dSet retention limits in journald.conf (see Retention and size limits above).
Performance issues
Section titled “Performance issues”If console logging causes performance problems:
Increase root level to reduce volume:
<root level="WARN"> <appender-ref ref="STDOUT"/></root>Configure journal rate limiting in journald.conf:
[Journal]RateLimitIntervalSec=30sRateLimitBurst=10000Comparison: file logs vs. journal
Section titled “Comparison: file logs vs. journal”| Feature | File logs (mideyeserver.log) | systemd journal |
|---|---|---|
| Persistence | Depends on rotation policy | Depends on journal config |
| Access | Any user with file permissions | Root or users in systemd-journal group |
| Filtering | grep, awk, text tools | journalctl with structured filters |
| Rotation | Logback configuration | Automatic by journald |
| Forwarding | File tailing (Filebeat, etc.) | ForwardToSyslog, journal-remote |
| Format | Customizable (Logback pattern) | Plain text + structured metadata |
| Web UI | Yes (Log Files page) | No (command-line only) |
Related documentation
Section titled “Related documentation”- Overview: Logback configuration file locations and structure
- Log Levels: Configure what gets logged to console
- Syslog: Forward logs to syslog servers (including journal → syslog)
- Log Aggregators: Modern alternative to syslog for centralized logging