Log Message Events
LogMessageEvents is a global setting in Sandboxie Ini available since v1.15.2 / 5.70.2. It indicates that Sandboxie should log all Sandboxie messages to the Windows System Event Log.
Usage
Overview
When enabled, this setting causes all Sandboxie messages (SBIE codes) to be written to the Windows System Event Log with a source of SbieDrv
1. This provides a centralized location for viewing and monitoring all Sandboxie activity, including errors, warnings, and informational messages that would normally only appear in popup dialogs or the Sandboxie message log.
Behavior
The LogMessageEvents
setting affects how Sandboxie handles message logging at the driver level2. When a message is generated:
- The message is first processed through the normal Sandboxie message system7.
- If
LogMessageEvents
is enabled, the message is additionally sent to the Windows Event Log as an informational event8. - The event includes the formatted message text and is tagged with the appropriate SBIE message code9.
Usage Scenarios
This setting is particularly useful for:
- System Administrators: Monitoring Sandboxie activity across multiple systems through centralized log management.
- Debugging: Capturing a complete record of Sandboxie operations for troubleshooting.
- Compliance: Maintaining audit logs of sandboxed application behavior.
- Automation: Allowing monitoring tools to watch for specific Sandboxie events through standard Windows Event Log APIs.
Message Filtering
Not all Sandboxie messages are logged to the event log when this setting is enabled. The following message types are specifically excluded from event logging3:
- MSG_2199: Auto Recovery notifications.
- MSG_2198: File Migration progress notifications.
- MSG_1399: Process Start notifications.
These exclusions prevent the event log from being overwhelmed with routine operational messages that occur frequently during normal Sandboxie operation.
Performance Considerations
Enabling LogMessageEvents
has minimal performance impact under normal circumstances. However, in environments with high sandbox activity, the additional event log writes may contribute to system overhead. The setting should be used judiciously in production environments where maximum performance is critical.
Implementation Notes
The LogMessageEvents
functionality is implemented at both the kernel driver level and the service level4:
- The driver component (SbieDrv) checks the setting during configuration loading10
- Messages are processed through the service component which formats and writes them to the event log11
- The setting is cached for performance and re-read when the configuration is reloaded12
Troubleshooting
If LogMessageEvents
is enabled but events are not appearing in the Windows Event Log:
- Verify the setting is properly configured in the
[GlobalSettings]
section. - Check that the Sandboxie service has appropriate permissions to write to the Event Log.
- Restart the Sandboxie service after changing the setting.
- Verify that Windows Event Log service is running.
Historical Context
This feature was introduced in Sandboxie Plus version 1.15.2 / 5.70.2 as part of enhanced monitoring capabilities5. A critical bug that could cause system crashes (BSoD) when using this setting was fixed in version 1.15.46.
-
Source:
LogMessage_Event
function in/Sandboxie/core/svc/main.cpp
. ↩ -
Source:
Log_LogMessageEvents
boolean variable definition in/Sandboxie/core/drv/log.c
. ↩ -
Source: Message filtering logic in
/Sandboxie/core/svc/DriverAssistLog.cpp
. ↩ -
Source: Data communication via
Api_SendServiceMessage
in/Sandboxie/core/drv/log.c
. ↩ -
Source: CHANGELOG.md entry for version 1.15.2 / 5.70.2 ↩
-
Source: CHANGELOG.md entry for version 1.15.4 / 5.70.4 BSoD fix ↩
-
Source:
Log_Popup_Msg
function call logic in/Sandboxie/core/drv/log.c
. ↩ -
Source:
ReportEvent
call in/Sandboxie/core/svc/main.cpp
. ↩ -
Source: Message formatting in
SbieDll_FormatMessage2
call in/Sandboxie/core/svc/main.cpp
. ↩ -
Source: Configuration loading in
Conf_Get_Boolean
call in/Sandboxie/core/drv/conf.c
. ↩ -
Source:
LogMessage
function in/Sandboxie/core/svc/DriverAssistLog.cpp
. ↩ -
Source:
Log_LogMessageEvents
global variable caching in/Sandboxie/core/drv/log.h
. ↩