Logging Configuration

πŸ“‹ Log Configuration Summary

Service
Max Size
Max Files
Total Storage
Description

MySQL

10MB

3

~30MB

Database logs and queries

Guacd

5MB

3

~15MB

Protocol daemon logs

Guacamole

20MB

5

~100MB

Application logs (most verbose)

OpenResty

10MB

5

~50MB

Access logs and proxy logs

Total Maximum Log Storage: ~195MB

πŸ” Useful Logging Commands

View Live Logs

# All services
docker-compose logs -f

# Specific service
docker-compose logs -f openresty
docker-compose logs -f guacamole
docker-compose logs -f mysql
docker-compose logs -f guacd

# Last N lines
docker-compose logs --tail=50 openresty

Filter Logs by Time

Search in Logs

Log File Locations

Log files are stored in Docker's default location:

  • Windows: C:\ProgramData\docker\containers\<container-id>\<container-id>-json.log

  • Linux: /var/lib/docker/containers/<container-id>/<container-id>-json.log

Export Logs

⚠️ Log Rotation

The logging configuration automatically rotates logs when:

  • File size exceeds the max-size limit

  • Number of files exceeds max-file limit

Oldest logs are automatically deleted to maintain storage limits.

πŸ”§ Advanced Logging Options

Enable Debug Logging (Development)

Add to specific service in docker-compose.yml:

Send Logs to External System

For production, consider:

  • Fluentd: For centralized logging

  • ELK Stack: Elasticsearch, Logstash, Kibana

  • Splunk: Enterprise logging solution

Example with Fluentd:

🚨 Log Monitoring

Critical Patterns to Monitor

  • ERROR, FATAL, CRITICAL

  • Authentication failed

  • Connection refused

  • Out of memory

  • Database connection lost

  • SSL/TLS errors

Health Check via Logs

πŸ“ˆ Log Analysis

Common Log Queries

Last updated