Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointer Exception when addTag method is called upon the return Object of Logger.logDatabaseErrors() #360

Closed
NX-Mirco-Centrone opened this issue Sep 5, 2022 · 4 comments · Fixed by #357
Assignees
Labels
Layer: Logger Engine Items related to the core logging engine Logging Source: Apex Items related to using Logger within Apex Type: Bug Something isn't working

Comments

@NX-Mirco-Centrone
Copy link

Package Edition of Nebula Logger

Unlocked Package

Package Version of Nebula Logger

v.4.8.0

New Bug Summary

addTag() method throws a NullPointer Exception when is called from the LogEntryEventBuilder return Object of logDatabaseErrors().

@NX-Mirco-Centrone NX-Mirco-Centrone added the Type: Bug Something isn't working label Sep 5, 2022
@jongpie
Copy link
Owner

jongpie commented Sep 12, 2022

Thanks @NX-Mirco-Centrone for the info! I'm not sure why I originally designed the logDatabaseErrors() method to sometimes return null - it's very inconsistent with how the other methods work. I'll change this ASAP.

@jongpie jongpie self-assigned this Sep 12, 2022
@jongpie jongpie added Logging Source: Apex Items related to using Logger within Apex Layer: Logger Engine Items related to the core logging engine labels Sep 12, 2022
jongpie added a commit that referenced this issue Sep 13, 2022
… return a non-null instance of LogEntryEventBuilder
@jongpie
Copy link
Owner

jongpie commented Sep 13, 2022

@NX-Mirco-Centrone I was able to get this fixed (see changes), it'll be included in the next release, v4.8.2

@NX-Mirco-Centrone
Copy link
Author

@jongpie Thank You for your amazing work!

jongpie added a commit that referenced this issue Sep 22, 2022
* Closed #347 & #356 by deprecating LogScenarioRule__mdt object & replacing it with a new object LoggerScenarioRule__mdt that provides optional overrides for all fields on LoggerSettings__c

* Added new Apex class LogScenarioRule to manage accessing LoggerScenarioRule__mdt CMDT records

* Incorporated the stellar idea from @jamessimone to tie LogEntry__c records to the new LoggerScenario__c object via a new lookup field LogEntry__c.EntryScenario__c

* Added new method Logger.endScenario(String) so that Apex developers can explicitly end a scenario, which then automatically rolls back to the previous scenario (and re-applies the previous scenario rule, if one exists) - another fantastic suggestion from @jamessimone

* Renamed LoggerSettings__c.DefaultLogScenario__c to LoggerSettings__c.DefaultScenario__c for consistency

* Fixed #360 by changing Logger.logDatabaseErrors() overloads to always return a non-null instance of LogEntryEventBuilder

* Updated some formatting in SlackLoggerPlugin to better format stack traces & create new plugin package version v1.5.0

* Fixed #363 by correcting some references in the migration script ./scripts/data/migrate-log-scenario-field-to-logger-scenario-object.apex

* Added content in README that links to the wiki's architecture overview

* Removed build numbers for package versions in sfdx-project.json, upgraded some packages in package.json to resolve some GitHub security alerts
@jongpie
Copy link
Owner

jongpie commented Sep 22, 2022

Closing this out, this has been released in v4.8.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Layer: Logger Engine Items related to the core logging engine Logging Source: Apex Items related to using Logger within Apex Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants