Logging System
EVerest uses a comprehensive logging system with multiple severity levels.Log Levels
Use the appropriateEVLOG macro for different message types:
- debug
- info
- warning
- error
Verbose information for development and troubleshooting:
Configuring Log Output
Log configuration is set inlogging.ini:
Runtime Log Level Control
Change log levels at runtime via environment variables:Session Logging
Many modules support detailed session logging:- Protocol messages (ISO15118, SLAC, etc.)
- State transitions
- Measurement values
- Error conditions
MQTT Inspection
EVerest uses MQTT for inter-module communication. Inspecting MQTT traffic is crucial for debugging.Connecting to MQTT
By default, EVerest runs an internal MQTT broker onlocalhost:1883.
Subscribe to all topics:
Important MQTT Topics
Module Status
Module Status
Monitor module lifecycle:Shows when modules become ready.
Interface Commands
Interface Commands
Watch commands between modules:
Interface Results
Interface Results
See command responses:
Variables
Variables
Monitor published variables:
Error Messages
Error Messages
Track raised errors:
Sending Test Commands
You can send commands to modules via MQTT for testing:MQTT Tools
mosquitto_sub
Command-line MQTT subscriber
mosquitto_pub
Command-line MQTT publisher
mqttui
Interactive TUI for MQTT
MQTT Explorer
GUI MQTT clientDownload from http://mqtt-explorer.com/
Debug Tools
GDB Debugging
Debug modules with GDB:Attaching to Running Process
Valgrind for Memory Issues
Detect memory leaks and errors:AddressSanitizer
Build with AddressSanitizer for runtime memory error detection:Packet Capture
The PacketSniffer module captures network traffic for protocol debugging.Enabling Packet Capture
.pcap files for each charging session that can be analyzed with Wireshark.
Analyzing with Wireshark
Common Issues
Module fails to start
Module fails to start
Symptoms: Module not appearing in MQTT topics, manager crashesDebug steps:
- Check manager logs for errors
- Verify manifest.yaml is valid
- Ensure required interfaces are provided by other modules
- Check config.yaml for correct module/interface mapping
Interface connection errors
Interface connection errors
Symptoms: “Required interface not satisfied” errorsDebug steps:
- Verify module provides the required interface
- Check config.yaml module connections
- Ensure module names match in config
No MQTT messages appearing
No MQTT messages appearing
Symptoms: mosquitto_sub shows no messagesDebug steps:
- Verify MQTT broker is running:
ps aux | grep mosquitto - Check broker port:
netstat -tlnp | grep 1883 - Verify EVerest is connected: check manager logs
- Check topic filter is correct (use
#for wildcard)
Charging session not starting
Charging session not starting
Symptoms: Car connected but no chargingDebug steps:
- Check EVSE state:
mosquitto_sub -t 'everest/evse_manager/+/var/session_event' - Verify authorization: check Auth module logs
- Review power path: check energy manager limits
- Inspect protocol: enable session logging for ISO15118/SLAC details
Segmentation faults
Segmentation faults
Symptoms: Crash with “Segmentation fault (core dumped)”Debug steps:
- Enable core dumps:
ulimit -c unlimited - Run with GDB to get backtrace
- Check for null pointer dereferences
- Use AddressSanitizer or Valgrind
Performance Debugging
Profiling with perf
CPU Usage
Best Practices
Next Steps
Testing
Write tests to catch issues early
Development Tools
Master ev-cli and other development tools
Logging Reference
Complete logging API reference
Error Handling
Learn the error framework