NebulaLogger
NebulaLogger copied to clipboard
Scenario logging level is not respected when Platform Event Storage Logging Level is null
Package Edition of Nebula Logger
Unlocked Package
Package Version of Nebula Logger
v4.11
New Bug Summary
Setup Org wide settings:
- LoggingLevel =
ERROR - Enabled = true
- Enable Saving = true
- Platform Event Storage Location = CUSTOM_OBJECTS
- Platform Event Storage Logging Level = (not set - i think this matters later)
Scenario rule settings for SCENARIO_A:
- User Logging Level =
INFO - Enabled = true
- Enable Platform Event Storage Override = (not set)
- Platform Event Storage Location = (not set)
- Enable Log Retention Policy = true
- Days to Retain Logs = 90
Code
Logger.setScenario('SCENARIO_A');
Logger.info('any message');
Logger.saveLog();
Expected results
- A single log and log entry generated, belonging to
SCENARIO_A
Actual results
- Logger finds our rules for
SCENARIO_A - A
LogEntryEvent__cis created (visible from the streaming console) - Event handler is reached, and runs the
filterLogEntryEventsToSavemethod - Event is filtered out
- No log/log entry is created
When I change the org wide settings like so:
- Platform Event Storage Logging Level =
INFO
... and re-run the same code snippet, the results are:
- A single log and log entry generated, belonging to
SCENARIO_A
It seems like a bug in how it picks logging level to keep or filter out in filterLogEntryEventsToSave where scenario log level is not respected, but only when the Platform Event Storage Logging Level is null?