Skip to content

Added support for logging instances of Database.EmptyRecycleBinResult and List<Database.EmptyRecycleBinResult>

Latest
Compare
Choose a tag to compare
@jongpie jongpie released this 19 Dec 02:01
b5ac18e

Thanks to @TrangOul for this release by suggesting issue #804 and implementing it in PR #806! 👏🥳

Core Unlocked Package Changes

This release provides the ability to log instances of Database.EmptyRecycleBinResult and List<Database.EmptyRecycleBinResult>. Support was previously added for logging the Database result classes DeleteResult, LeadConvertResult, MergeResult, SaveResult, UpsertResult and UndeleteResult (for more details see release notes for v4.2.0, v4.3.0, v4.7.4, and v4.10.0). But EmptyRecycleBinResult had been overlooked - and in this release, it's now supported like the other result classes 🎉

  • Add new instance method overloads in LogEntryEventBuilder for setDatabaseResult() to support logging instances of Database.EmptyRecycleBinResult and List<Database.EmptyRecycleBinResult>

    global LogEntryEventBuilder setDatabaseResult(Database.EmptyRecycleBinResult emptyRecycleBinResult);
    global LogEntryEventBuilder setDatabaseResult(List<Database.EmptyRecycleBinResult> emptyRecycleBinResults);
  • Added new static method overloads in Logger to make it easier to log instances of Database.EmptyRecycleBinResult and List<Database.EmptyRecycleBinResult>

    global static LogEntryEventBuilder error(LogMessage logMessage, Database.EmptyRecycleBinResult emptyRecycleBinResult);
    global static LogEntryEventBuilder error(String message, Database.EmptyRecycleBinResult emptyRecycleBinResult);
    global static LogEntryEventBuilder warn(LogMessage logMessage, Database.EmptyRecycleBinResult emptyRecycleBinResult);
    global static LogEntryEventBuilder warn(String message, Database.EmptyRecycleBinResult emptyRecycleBinResult);
    global static LogEntryEventBuilder info(LogMessage logMessage, Database.EmptyRecycleBinResult emptyRecycleBinResult);
    global static LogEntryEventBuilder info(String message, Database.EmptyRecycleBinResult emptyRecycleBinResult);
    global static LogEntryEventBuilder debug(LogMessage logMessage, Database.EmptyRecycleBinResult emptyRecycleBinResult);
    global static LogEntryEventBuilder debug(String message, Database.EmptyRecycleBinResult emptyRecycleBinResult);
    global static LogEntryEventBuilder fine(LogMessage logMessage, Database.EmptyRecycleBinResult emptyRecycleBinResult);
    global static LogEntryEventBuilder fine(LogMessage logMessage, Database.EmptyRecycleBinResult emptyRecycleBinResult);
    global static LogEntryEventBuilder finer(String message, Database.EmptyRecycleBinResult emptyRecycleBinResult);
    global static LogEntryEventBuilder finer(String message, Database.EmptyRecycleBinResult emptyRecycleBinResult);
    global static LogEntryEventBuilder finest(String message, Database.EmptyRecycleBinResult emptyRecycleBinResult);
    global static LogEntryEventBuilder finest(String message, Database.EmptyRecycleBinResult emptyRecycleBinResult);
    global static LogEntryEventBuilder logDatabaseErrors(System.LoggingLevel loggingLevel, LogMessage logMessage, List<Database.EmptyRecycleBinResult> emptyRecycleBinResults);
    global static LogEntryEventBuilder logDatabaseErrors(System.LoggingLevel loggingLevel, String message, List<Database.EmptyRecycleBinResult> emptyRecycleBinResults);
  • Simplified + improved readability of some older Apex code throughout the codebase by using the safe navigator operator ?. and null coalescing operator ?? in several places
  • Fixed some existing code that caused PMD scan violations in newer versions of PMD/sf code analyzer

Installation Info

Core Unlocked Package - no namespace

Full Changelog: v4.15.1...v4.15.2