From 7944b0d162c3f24ef8ce2e015f62483e93852c4b Mon Sep 17 00:00:00 2001 From: Jonathan Gillespie Date: Mon, 8 Mar 2021 18:32:23 -0800 Subject: [PATCH] Release v4.2.0 (#100) * Released new managed package v4.2.0 * Added 'view documentation' button in README + topics details * Added & updated javadoc comments in all classes * DmlResultErrors__c field is now DatabaseResultJson__c, updated naming convention to use 'Database' instead of 'DML' --- README.md | 83 +- config/apexdocs.json | 4 +- content/btn-view-documentation.png | Bin 0 -> 2358 bytes .../classes/LogBatchPurgeScheduler.cls | 2 +- .../log-management/classes/LogBatchPurger.cls | 2 +- .../classes/LogEntryEventHandler.cls | 6 +- .../classes/LogEntryFieldSetPicklist.cls | 8 +- .../classes/LogEntryHandler.cls | 5 +- .../log-management/classes/LogHandler.cls | 5 +- .../LogEntryRecordPage.flexipage-meta.xml | 11 +- ...gEntry__c-Log Entry Layout.layout-meta.xml | 6 +- ...l => DatabaseResultJson__c.field-meta.xml} | 4 +- ...l => DatabaseResultType__c.field-meta.xml} | 4 +- .../HasDatabaseResult__c.field-meta.xml | 10 + .../LoggerAdmin.permissionset-meta.xml | 9 +- .../LoggerEndUser.permissionset-meta.xml | 2 +- .../LoggerLogViewer.permissionset-meta.xml | 9 +- .../profiles/Admin.profile-meta.xml | 13 +- .../logger-engine/classes/FlowLogEntry.cls | 20 +- .../classes/FlowRecordLogEntry.cls | 27 +- .../classes/LogEntryEventBuilder.cls | 118 +- .../main/logger-engine/classes/LogMessage.cls | 10 +- .../main/logger-engine/classes/Logger.cls | 1968 +++++++++++++++-- ...l => DatabaseResultJson__c.field-meta.xml} | 4 +- ...l => DatabaseResultType__c.field-meta.xml} | 4 +- .../classes/LoggerInstallHandler.cls | 4 +- .../classes/LogEntryEventHandler_Tests.cls | 2 +- .../classes/FlowRecordLogEntry_Tests.cls | 2 +- .../classes/LogEntryEventBuilder_Tests.cls | 74 +- .../logger-engine/classes/Logger_Tests.cls | 1192 +++++----- sfdx-project.json | 12 +- 31 files changed, 2634 insertions(+), 986 deletions(-) create mode 100644 content/btn-view-documentation.png rename nebula-logger/main/log-management/objects/LogEntry__c/fields/{DmlResultErrors__c.field-meta.xml => DatabaseResultJson__c.field-meta.xml} (79%) rename nebula-logger/main/log-management/objects/LogEntry__c/fields/{DmlResultType__c.field-meta.xml => DatabaseResultType__c.field-meta.xml} (94%) create mode 100644 nebula-logger/main/log-management/objects/LogEntry__c/fields/HasDatabaseResult__c.field-meta.xml rename nebula-logger/main/logger-engine/objects/LogEntryEvent__e/fields/{DmlResultErrors__c.field-meta.xml => DatabaseResultJson__c.field-meta.xml} (81%) rename nebula-logger/main/logger-engine/objects/LogEntryEvent__e/fields/{DmlResultType__c.field-meta.xml => DatabaseResultType__c.field-meta.xml} (81%) diff --git a/README.md b/README.md index 179884747..4bc9fb547 100644 --- a/README.md +++ b/README.md @@ -3,19 +3,21 @@ Designed for Salesforce admins, developers & architects. A robust logger for Apex, Flow, Process Builder & Integrations. -[![Install Managed Package](./content/btn-install-managed-package.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000000XJZ7QAO) [![Deploy Unpackaged Metadata](./content/btn-deploy-unmanaged-metadata.png)](https://githubsfdeploy.herokuapp.com) +[![Install Managed Package](./content/btn-install-managed-package.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000000Xg4wQAC) +[![View Documentation](./content/btn-view-documentation.png)](https://jongpie.github.io/NebulaLogger/) ## Features 1. Easily add log entries via Apex, Flow & Process Builder to generate 1 consolidate log -2. Manage & report on logging data using the `Nebula__Log__c` and `Nebula__LogEntry__c` objects -3. Leverage `Nebula__LogEntryEvent__e` platform events for real-time monitoring & integrations -4. Enable logging and set the logging level for different users & profiles using `Nebula__LoggerSettings__c` custom hierarchy setting +2. Manage & report on logging data using the `Log__c` and `LogEntry__c` objects +3. Leverage `LogEntryEvent__e` platform events for real-time monitoring & integrations +4. Enable logging and set the logging level for different users & profiles using `LoggerSettings__c` custom hierarchy setting 5. View related log entries on any record page by adding the 'Related Log Entries' component in App Builder +6. Dynamically assign Topics to `Log__c` and `LogEntry__c` records for tagging/labeling your logs (not currently available in the managed package) ## Installing -In general, using the managed package is recommended - but you can choose to either deploy the metadata from this repo to your org, or install the managed package. The metadata is the same, but there are some differences in using the 2 versions. All examples in README include the `Nebula` namespace - simply remove the namespace from the examples if you are using the unpackaged metadata. +You can choose to either deploy the metadata from this repo to your org, or install the managed package. The metadata is the same, but there are some differences in using the 2 versions. All examples in README are for the unmanaged metadata - simply add the `Nebula` namespace from the examples if you are using the managed package. | | Unpackaged Metadata | 2nd Gen Managed Package | | ----------- | ------------------- | ----------------------- | @@ -23,7 +25,8 @@ In general, using the managed package is recommended - but you can choose to eit | Future Releases | New enhancements & bugfixes will be immediately available in GitHub | Slower release cycle: new package versions will only be released once new enhancements & bugfixes have been tested and code is stabilized | | Public Apex Methods | Any `public` Apex methods are subject to change in the future - they can be used, but you may encounter deployment issues if future changes to `public` methods are not backwards-compatible | Only `global` methods are available in managed packages - any `global` Apex methods available in the managed package will be supported for the foreseeable future | | Apex Debug Statements | `System.debug()` is automatically called | Requires adding your own calls for `System.debug()` due to Salesforce limitations with managed packages | -| Apex Stack Traces | Automatically stored in `LogEntry__c.StackTrace__c` when calling methods like `Logger.debug('my message');` | Requires calling `parseStackTrace()` due to Salesforce limitations with managed packages. For example:
`Nebula.Logger.debug('my message').parseStackTrace(new DmlException().getStackTrace());` | +| Apex Stack Traces | Automatically stored in `LogEntry__c.StackTrace__c` when calling methods like `Logger.debug('my message');` | Requires calling `parseStackTrace()` due to Salesforce limitations with managed packages. For example:
`Logger.debug('my message').parseStackTrace(new DmlException().getStackTrace());` | +| Assign Topics (Tagging/Labeling System) | Provide `List topics` in Apex or Flow to dynamically assign Salesforce Topics to `Log__c` and `LogEntry__c` records | This functionality is not currently available in the managed package | ## Getting Started After deploying Nebula Logger to your org, there are a few additional configuration changes needed... @@ -32,28 +35,32 @@ After deploying Nebula Logger to your org, there are a few additional configurat * `LoggerEndUser` provides access to generate logs, as well as read-only access to any log records shared with the user. * `LoggerLogViewer` provides view-all access (read-only) to all log records. This does **not** provide access to generate logs. * `LoggerLogAdmin` provides view-all and modify-all access to all log records. -* Customize the default settings in `Nebula__LoggerSettings__c` +* Customize the default settings in `LoggerSettings__c` * You can customize settings at the org, profile and user levels +* Unmanaged Metadata Only: Enable Salesforce Topics for the `Log__c` and `LogEntry__c` objects for tagging/labeling. See [Salesforce Help](https://help.salesforce.com/articleView?id=sf.collab_topics_records_admin.htm) for more details. + * Currently, enabling Topics for objects must still be done using the Salesforce Classic UI. Once enabled, Topics can then be used from withing Lightning Experience. + * Once enabled, Topics can be added via Apex and Flow and then used as list view filters (and more) for the object `Log__c`. + ## Logger for Apex: Quick Start -For Apex developers, the `Nebula.Logger` class has several methods that can be used to add entries with different logging levels. Each logging level's method has several overloads to support multiple parameters. +For Apex developers, the `Logger` class has several methods that can be used to add entries with different logging levels. Each logging level's method has several overloads to support multiple parameters. ```java // This will generate a debug statement within developer console System.debug('Debug statement using native Apex'); -// This will create a new `Nebula__Log__c` record with multiple related `Nebula__LogEntry__c` records -Nebula.Logger.error('Add log entry using Nebula Logger with logging level == ERROR'); -Nebula.Logger.warn('Add log entry using Nebula Logger with logging level == WARN'); -Nebula.Logger.info('Add log entry using Nebula Logger with logging level == INFO'); -Nebula.Logger.debug('Add log entry using Nebula Logger with logging level == DEBUG'); -Nebula.Logger.fine('Add log entry using Nebula Logger with logging level == FINE'); -Nebula.Logger.finer('Add log entry using Nebula Logger with logging level == FINER'); -Nebula.Logger.finest('Add log entry using Nebula Logger with logging level == FINEST'); -Nebula.Logger.saveLog(); +// This will create a new `Log__c` record with multiple related `LogEntry__c` records +Logger.error('Add log entry using Nebula Logger with logging level == ERROR'); +Logger.warn('Add log entry using Nebula Logger with logging level == WARN'); +Logger.info('Add log entry using Nebula Logger with logging level == INFO'); +Logger.debug('Add log entry using Nebula Logger with logging level == DEBUG'); +Logger.fine('Add log entry using Nebula Logger with logging level == FINE'); +Logger.finer('Add log entry using Nebula Logger with logging level == FINER'); +Logger.finest('Add log entry using Nebula Logger with logging level == FINEST'); +Logger.saveLog(); ``` -This results in 1 `Nebula__Log__c` record with several related `Nebula__LogEntry__c` records. +This results in 1 `Log__c` record with several related `LogEntry__c` records. ![Apex Log Results](./content/apex-log.png) @@ -66,7 +73,7 @@ In this simple example, a Flow is configured after-insert and after-update to lo ![Flow Builder: Log Case](./content/flow-builder-log-case.png) -This results in a `Nebula__Log__c` record with related `Nebula__LogEntry__c` records. +This results in a `Log__c` record with related `LogEntry__c` records. ![Flow Log Results](./content/flow-log.png) @@ -76,37 +83,37 @@ After incorporating Logger into your Flows & Apex code (including controllers, t ```java Case currentCase = [SELECT Id, CaseNumber, Type, Status, IsClosed FROM Case LIMIT 1]; -Nebula.Logger.info('First, log the case through Apex', currentCase); +Logger.info('First, log the case through Apex', currentCase); -Nebula.Logger.debug('Now, we update the case in Apex to cause our record-triggered Flow to run'); +Logger.debug('Now, we update the case in Apex to cause our record-triggered Flow to run'); update currentCase; -Nebula.Logger.info('Last, save our log'); -Nebula.Logger.saveLog(); +Logger.info('Last, save our log'); +Logger.saveLog(); ``` -This generates 1 consolidated `Nebula__Log__c`, containing `Nebula__LogEntry__c` records from both Apex and Flow +This generates 1 consolidated `Log__c`, containing `LogEntry__c` records from both Apex and Flow ![Flow Log Results](./content/combined-apex-flow-log.png) ## Event-Driven Integrations with Platform Events -Logger is built using Salesforce's [Platform Events](https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/platform_events_intro.htm), an event-driven messaging architecture. External integrations can subscribe to log events using the `Nebula__LogEntryEvent__e` object - see more details at [the Platform Events Developer Guide site](https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/platform_events_subscribe_cometd.htm) +Logger is built using Salesforce's [Platform Events](https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/platform_events_intro.htm), an event-driven messaging architecture. External integrations can subscribe to log events using the `LogEntryEvent__e` object - see more details at [the Platform Events Developer Guide site](https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/platform_events_subscribe_cometd.htm) ## Managing Logs -To help development and support teams better manage logs (and any underlying code or config issues), some fields on `Nebula__Log__c` are provided to track the owner, priority and status of a log. These fields are optional, but are helpful in critical environments (production, QA sandboxes, UAT sandboxes, etc.) for monitoring ongoing user activities. -* All editable fields on `Nebula__Log__c` can be updated via the 'Manage Log' quick action (shown below) +To help development and support teams better manage logs (and any underlying code or config issues), some fields on `Log__c` are provided to track the owner, priority and status of a log. These fields are optional, but are helpful in critical environments (production, QA sandboxes, UAT sandboxes, etc.) for monitoring ongoing user activities. +* All editable fields on `Log__c` can be updated via the 'Manage Log' quick action (shown below) ![Manage Log QuickAction](./content/manage-log-quickaction.png) -* Additional fields are automatically set based on changes to `Nebula__Log__c.Nebula__Status__c` - * `Nebula__Log__c.Nebula__ClosedBy__c` - The user who closed the log - * `Nebula__Log__c.Nebula__ClosedDate__c` - The datetime that the log was closed - * `Nebula__Log__c.Nebula__IsClosed__c` - Indicates if the log is closed, based on the selected status (and associated config in the 'Log Status' custom metadata type) - * `Nebula__Log__c.Nebula__IsResolved__c` - Indicates if the log is resolved (meaning that it required analaysis/work, which has been completed). Only closed statuses can be considered resolved. This is also driven based on the selected status (and associated config in the 'Log Status' custom metadata type) -* To customize the statuses provided, simply update the picklist values for `Nebula__Log__c.Nebula__Status__c` and create/update corresponding records in the custom metadata type `Nebula__LogStatus__mdt`. This custom metadata type controls which statuses are considerd closed and resolved. +* Additional fields are automatically set based on changes to `Log__c.Status__c` + * `Log__c.ClosedBy__c` - The user who closed the log + * `Log__c.ClosedDate__c` - The datetime that the log was closed + * `Log__c.IsClosed__c` - Indicates if the log is closed, based on the selected status (and associated config in the 'Log Status' custom metadata type) + * `Log__c.IsResolved__c` - Indicates if the log is resolved (meaning that it required analaysis/work, which has been completed). Only closed statuses can be considered resolved. This is also driven based on the selected status (and associated config in the 'Log Status' custom metadata type) +* To customize the statuses provided, simply update the picklist values for `Log__c.Status__c` and create/update corresponding records in the custom metadata type `LogStatus__mdt`. This custom metadata type controls which statuses are considerd closed and resolved. ## View Related Log Entries -Within App Builder, admins can add the 'Related Log Entries' lightning web component to any record page. Admins can also control which columns are displayed be creating & selecting a field set on `Nebula__LogEntry__c` with the desired fields. -* The component automatically shows any related log entries, based on `Nebula__LogEntry__c.Nebula__RecordId__c == :recordId` +Within App Builder, admins can add the 'Related Log Entries' lightning web component to any record page. Admins can also control which columns are displayed be creating & selecting a field set on `LogEntry__c` with the desired fields. +* The component automatically shows any related log entries, based on `LogEntry__c.RecordId__c == :recordId` * Users can search the list of log entries for a particular record using the component's built-insearch box. The component dynamically searches all related log entries using SOSL. * Component automatically enforces Salesforce's security model * Object-Level Security - Users without read access to LogEntry__c will not see the component @@ -116,7 +123,7 @@ Within App Builder, admins can add the 'Related Log Entries' lightning web compo ![Related Log Entries](./content/relate-log-entries-lwc.png) ## Deleting Old Logs Two Apex classes are provided out-of-the-box to handle automatically deleting old logs -1. `Nebula.LogBatchPurger` - this batch Apex class will delete any `Nebula__Log__c` records with `Nebula__Log__c.Nebula__LogRetentionDate__c <= System.today()`. - * By default, this field is populated with "TODAY + 14 DAYS" - the number of days to retain a log can be customized in `Nebula__LoggerSettings__c`. +1. `LogBatchPurger` - this batch Apex class will delete any `Log__c` records with `Log__c.LogRetentionDate__c <= System.today()`. + * By default, this field is populated with "TODAY + 14 DAYS" - the number of days to retain a log can be customized in `LoggerSettings__c`. * Users can also manually edit this field to change the retention date - or set it to null to prevent the log from being automatically deleted -2. `Nebula.LogBatchPurgeScheduler` - this schedulable Apex class can be schedule to run `Nebula.LogBatchPurger` on a daily or weekly basis \ No newline at end of file +2. `LogBatchPurgeScheduler` - this schedulable Apex class can be schedule to run `LogBatchPurger` on a daily or weekly basis diff --git a/config/apexdocs.json b/config/apexdocs.json index cfd780527..ba5d11eb6 100644 --- a/config/apexdocs.json +++ b/config/apexdocs.json @@ -1,5 +1,5 @@ { - "root": "nebula-logger-docs", + "root": "", "sourceLanguage": "java", "home": { "header": "./config/apexdocs-header.md" @@ -9,4 +9,4 @@ "includeAuthor": false, "includeDate": false } -} \ No newline at end of file +} diff --git a/content/btn-view-documentation.png b/content/btn-view-documentation.png new file mode 100644 index 0000000000000000000000000000000000000000..6847f9bcacc8498af723e290e89afc1d347d2720 GIT binary patch literal 2358 zcmV-63CZ?}P)EX>4Tx04R}tkvT{MK^TQU6D1;wg(*ZVwoofYQ4vdtVh|KUjNnzcyEzoHYuJt0 zSPHfQ3y;RAg^jhg7Pf*Qc!1d1St;5`SpP`^31S===Ht!0$IKh><yKDr^W3x%BLeII*X;RO88aAjBg>vGA?|069NB}D8d%a~Rx@oq!=(M^K z5gCmrwVWi40{yZGa_5FhmY%@!A#aRK6ph)jyixB!|hE~K4Sx0tp>CXLch zN~hJ0s2q{cgeV{pQ9vT1fJ8(AiHHK41cSp~R6jUR-BrhJb(*3k3`QGk4z}@PwfU|Z zTzA!hMBjj>s0mF`6Uv?E$k>08`gZ3dc>!OnHnZkn+k+<{f0=~UIyJxhuy;hc!DvG+ zg)FV=o*Hf`PQg-~f^**-idJgKEW1dpY2bks!k6E=O!=9faoc^+YG>X)jvBGFfNJdonC*xWRAx<-^;u()n(H!$eo zT!#~@%OjNSSshK)<{9_RcKK)dbCyZ6+M=g4ys&Hv3A-Vl^y(N zr*>Rho=Fd(^!+XXI<0Q<4x6ZN_odglu>l-?HjXH@T&O$yv4bFgDU0I+soXRJiM|1E zS(?z_t+uav^D;>qe<~aL>2(YfAMQ`}mUy0e{Sp?N8$X$ZlRFZbHN}5aKLI5A28vfj zQFh`Q_CXKJXQ}wxbMbuTtv1^GhS*Wj&TA(>;j}&xm)lE9X)_j^oA5vxCwC-rqQ%Zj z?{?Df^q?tf;=tNiPPh4@?km|b3=VtAFE?@AXhSZQ5FRMwuUq0t)+ngE>R|1!O)Qxi z$h(bJ?1LV*E(+(>+}QiOh|Zo9ETl1m(S}APM;ocQt=-BuF7d6$!ssqZrQ@e5>@{>z zchy0bHi&l`twQu#k)#r$+B=O_RwPX<73!juxIJFsTx)b{`bu^5mFifdQ?stzB-E|Y z24Vl14oh(gm769uduv+k72KIBmekL0^KF4d^0nQfE{i49K&>% zq|(1fM{}2pBWHU#txx2OvsApA8_Q{Z;&st0X(~*jyCjvTQ`PJ>bg^!J2=8y3$@DNk zEX66Tn;$a5#&7)o3TmZ{zEU0CC8-=(8%x%&T7~*c-Ge-tq@uedm9`%xbLeyr=grRh zE1<25Z>F&$XM4#{54mHz|F%1M{`ySxmr3~A{1EQ>baN3w1yIl4jC=Zd($8zs%SFyjUeqCaH*0`vQ2*++Z$r zxyJPK2Bp_iy1z`q>_`RwzT&v!1||1U8?i6@HVOw%_0VW`jca4A$-(xe;WsC3vKl{` zL=bRXm>(M#h5^3UGBj#AAKu~opIZt8gw%Di)lStpD;ElrMr}Lo#~+P2E_ghGEUk*% zLndlX1L&faXd@K_E2K1ym=vP`oqU$X(uM0-<;`Tuc3>Y0^i!}iNqiZ ztIfQU9RomNwOM#wWx@1-5p_2R@|R*T+Q`zXs5K36;-Z}m3qmJ77GwE2?yV8GPqel{ z4>7@hLNqcMZA7bY3U>HY;ua##Y!xpbvvBOWcmT@J^e{B+C4FkZ9dEb%-w0^Kf>4Uz zvv6ST=nJyyE%D?XHnIM8${YXsWW*x6eEl?X z4z;0>OPQ@vkewDRT+qodmY-vhpAo{gqwSQPxW?bNC-7L=MIv@JqEbltYFaSOmO){y z7aAZVr0_iZ){LA4zsQXxzx<}(8kHQw_Jn)73zP6dz4zAL$LGP|u$NPp2hc_;hzXYS zu=23`DbY7@U%c{{NgjzeARh%k#b;q6qJTt10f~qL5_u#A6s4Bq9P)@GAu=hPLmr~k za->Nb1+^xJI3gmGqSoXfNuxljUlu`OwV9e0yBLW?CKP#UTI>{7o6#?eKmy{o@gfuF c)8EGb5C5^u1rau(I{*Lx07*qoM6N<$f(IpXp#T5? literal 0 HcmV?d00001 diff --git a/nebula-logger/main/log-management/classes/LogBatchPurgeScheduler.cls b/nebula-logger/main/log-management/classes/LogBatchPurgeScheduler.cls index 1da44cc92..501a9fdbf 100644 --- a/nebula-logger/main/log-management/classes/LogBatchPurgeScheduler.cls +++ b/nebula-logger/main/log-management/classes/LogBatchPurgeScheduler.cls @@ -5,7 +5,7 @@ /** * @group log-management - * @description Schedulable class used to schedule the batch job LogBatchPurger + * @description Schedulable class used to schedule the batch job `LogBatchPurger` * @see LogBatchPurger */ global with sharing class LogBatchPurgeScheduler implements System.Schedulable { diff --git a/nebula-logger/main/log-management/classes/LogBatchPurger.cls b/nebula-logger/main/log-management/classes/LogBatchPurger.cls index d383bf74d..441750410 100644 --- a/nebula-logger/main/log-management/classes/LogBatchPurger.cls +++ b/nebula-logger/main/log-management/classes/LogBatchPurger.cls @@ -5,7 +5,7 @@ /** * @group log-management - * @description Batch class used to delete old logs, based on Log__c.LogRetentionDate__c <= :System.today() + * @description Batch class used to delete old logs, based on `Log__c.LogRetentionDate__c <= :System.today()` * @see LogBatchPurgeScheduler */ global with sharing class LogBatchPurger implements Database.Batchable, Database.Stateful { diff --git a/nebula-logger/main/log-management/classes/LogEntryEventHandler.cls b/nebula-logger/main/log-management/classes/LogEntryEventHandler.cls index ff6753d26..316edc7ae 100644 --- a/nebula-logger/main/log-management/classes/LogEntryEventHandler.cls +++ b/nebula-logger/main/log-management/classes/LogEntryEventHandler.cls @@ -5,7 +5,7 @@ /** * @group log-management - * @description Subscribes to LogEntryEvent__e platform events and normalizes the data into Log__c and LogEntry__c records + * @description Subscribes to `LogEntryEvent__e` platform events and normalizes the data into `Log__c` and `LogEntry__c` records */ public without sharing class LogEntryEventHandler { private static final Log__c LOG = new Log__c(); @@ -104,8 +104,8 @@ public without sharing class LogEntryEventHandler { : logEntryEvent.Timestamp__c; LogEntry__c logEntry = new LogEntry__c( - DmlResultErrors__c = logEntryEvent.DmlResultErrors__c, - DmlResultType__c = logEntryEvent.DmlResultType__c, + DatabaseResultJson__c = logEntryEvent.DatabaseResultJson__c, + DatabaseResultType__c = logEntryEvent.DatabaseResultType__c, ExceptionMessage__c = logEntryEvent.ExceptionMessage__c, ExceptionStackTrace__c = logEntryEvent.ExceptionStackTrace__c, ExceptionType__c = logEntryEvent.ExceptionType__c, diff --git a/nebula-logger/main/log-management/classes/LogEntryFieldSetPicklist.cls b/nebula-logger/main/log-management/classes/LogEntryFieldSetPicklist.cls index 97f6f57a9..e5e24e017 100644 --- a/nebula-logger/main/log-management/classes/LogEntryFieldSetPicklist.cls +++ b/nebula-logger/main/log-management/classes/LogEntryFieldSetPicklist.cls @@ -5,20 +5,20 @@ /** * @group log-management - * @description Dynamically returns LogEntry__c field sets in App Builder when configuring the component RelatedLogEntries + * @description Dynamically returns `LogEntry__c` field sets in App Builder when configuring the component RelatedLogEntries */ public without sharing class LogEntryFieldSetPicklist extends VisualEditor.DynamicPickList { /** * Returns a default value of null - admins must select a field set within App Builder - * @return return null (no default value) + * @return null (no default value) */ public override VisualEditor.DataRow getDefaultValue() { return null; } /** - * Returns the list of fields sets on LogEntry__c, allowing admins to specify any - * field set for each instance of the RelatedLogEntries component + * @description Returns the list of fields sets on `LogEntry__c`, allowing admins to specify any + * field set for each instance of the `RelatedLogEntries` component * @return The list of field sets on the LogEntry__c object */ public override VisualEditor.DynamicPickListRows getValues() { diff --git a/nebula-logger/main/log-management/classes/LogEntryHandler.cls b/nebula-logger/main/log-management/classes/LogEntryHandler.cls index 4cd120003..550c42544 100644 --- a/nebula-logger/main/log-management/classes/LogEntryHandler.cls +++ b/nebula-logger/main/log-management/classes/LogEntryHandler.cls @@ -5,9 +5,12 @@ /** * @group log-management - * @description Manages setting fields on LogEntry__c before insert & update + * @description Manages setting fields on `LogEntry__c` before insert & before update */ public without sharing class LogEntryHandler { + /** + * @description Runs the trigger handler's logic + */ public void execute() { List logEntries = (List) Trigger.new; diff --git a/nebula-logger/main/log-management/classes/LogHandler.cls b/nebula-logger/main/log-management/classes/LogHandler.cls index d52cd5d35..1cafd9c86 100644 --- a/nebula-logger/main/log-management/classes/LogHandler.cls +++ b/nebula-logger/main/log-management/classes/LogHandler.cls @@ -5,7 +5,7 @@ /** * @group log-management - * @description Manages setting fields on Log__c before insert & update + * @description Manages setting fields on `Log__c` before insert & before update */ public without sharing class LogHandler { @testVisible @@ -20,6 +20,9 @@ public without sharing class LogHandler { } } + /** + * @description Runs the trigger handler's logic + */ public void execute() { List logs = (List) Trigger.new; Map oldLogsById = (Map) Trigger.oldMap; diff --git a/nebula-logger/main/log-management/flexipages/LogEntryRecordPage.flexipage-meta.xml b/nebula-logger/main/log-management/flexipages/LogEntryRecordPage.flexipage-meta.xml index e4e94ef5c..6407462bb 100644 --- a/nebula-logger/main/log-management/flexipages/LogEntryRecordPage.flexipage-meta.xml +++ b/nebula-logger/main/log-management/flexipages/LogEntryRecordPage.flexipage-meta.xml @@ -276,7 +276,7 @@ uiBehavior readonly - Record.DmlResultType__c + Record.DatabaseResultType__c @@ -285,7 +285,7 @@ uiBehavior readonly - Record.DmlResultErrors__c + Record.DatabaseResultJson__c Facet-839d3f77-0b78-43a9-9477-6b63126dcf12 @@ -575,13 +575,14 @@ label - DML Result + Database Result flexipage:fieldSection - {!Record.LimitsAggregateQueries__c} - NE + {!Record.HasDatabaseResult__c} + EQUAL + true diff --git a/nebula-logger/main/log-management/layouts/LogEntry__c-Log Entry Layout.layout-meta.xml b/nebula-logger/main/log-management/layouts/LogEntry__c-Log Entry Layout.layout-meta.xml index 1f068bd45..ec4fe1551 100644 --- a/nebula-logger/main/log-management/layouts/LogEntry__c-Log Entry Layout.layout-meta.xml +++ b/nebula-logger/main/log-management/layouts/LogEntry__c-Log Entry Layout.layout-meta.xml @@ -104,15 +104,15 @@ true true true - + Readonly - DmlResultType__c + DatabaseResultType__c Readonly - DmlResultErrors__c + DatabaseResultJson__c diff --git a/nebula-logger/main/log-management/objects/LogEntry__c/fields/DmlResultErrors__c.field-meta.xml b/nebula-logger/main/log-management/objects/LogEntry__c/fields/DatabaseResultJson__c.field-meta.xml similarity index 79% rename from nebula-logger/main/log-management/objects/LogEntry__c/fields/DmlResultErrors__c.field-meta.xml rename to nebula-logger/main/log-management/objects/LogEntry__c/fields/DatabaseResultJson__c.field-meta.xml index 822546516..9c1b6e73b 100644 --- a/nebula-logger/main/log-management/objects/LogEntry__c/fields/DmlResultErrors__c.field-meta.xml +++ b/nebula-logger/main/log-management/objects/LogEntry__c/fields/DatabaseResultJson__c.field-meta.xml @@ -1,8 +1,8 @@ - DmlResultErrors__c + DatabaseResultJson__c false - + 131072 false false diff --git a/nebula-logger/main/log-management/objects/LogEntry__c/fields/DmlResultType__c.field-meta.xml b/nebula-logger/main/log-management/objects/LogEntry__c/fields/DatabaseResultType__c.field-meta.xml similarity index 94% rename from nebula-logger/main/log-management/objects/LogEntry__c/fields/DmlResultType__c.field-meta.xml rename to nebula-logger/main/log-management/objects/LogEntry__c/fields/DatabaseResultType__c.field-meta.xml index 210d2b78f..ab7582938 100644 --- a/nebula-logger/main/log-management/objects/LogEntry__c/fields/DmlResultType__c.field-meta.xml +++ b/nebula-logger/main/log-management/objects/LogEntry__c/fields/DatabaseResultType__c.field-meta.xml @@ -1,8 +1,8 @@ - DmlResultType__c + DatabaseResultType__c false - + false false false diff --git a/nebula-logger/main/log-management/objects/LogEntry__c/fields/HasDatabaseResult__c.field-meta.xml b/nebula-logger/main/log-management/objects/LogEntry__c/fields/HasDatabaseResult__c.field-meta.xml new file mode 100644 index 000000000..044a5a349 --- /dev/null +++ b/nebula-logger/main/log-management/objects/LogEntry__c/fields/HasDatabaseResult__c.field-meta.xml @@ -0,0 +1,10 @@ + + + HasDatabaseResult__c + false + NOT(ISBLANK(TEXT(DatabaseResultType__c))) + BlankAsZero + + false + Checkbox + diff --git a/nebula-logger/main/log-management/permissionsets/LoggerAdmin.permissionset-meta.xml b/nebula-logger/main/log-management/permissionsets/LoggerAdmin.permissionset-meta.xml index cd81aa68b..29271e40a 100644 --- a/nebula-logger/main/log-management/permissionsets/LoggerAdmin.permissionset-meta.xml +++ b/nebula-logger/main/log-management/permissionsets/LoggerAdmin.permissionset-meta.xml @@ -47,12 +47,12 @@ Provides access to manage all logs false - LogEntry__c.DmlResultErrors__c + LogEntry__c.DatabaseResultJson__c true false - LogEntry__c.DmlResultType__c + LogEntry__c.DatabaseResultType__c true @@ -70,6 +70,11 @@ LogEntry__c.ExceptionType__c true + + false + LogEntry__c.HasDatabaseResult__c + true + false LogEntry__c.HasExceptionStackTrace__c diff --git a/nebula-logger/main/log-management/permissionsets/LoggerEndUser.permissionset-meta.xml b/nebula-logger/main/log-management/permissionsets/LoggerEndUser.permissionset-meta.xml index 363e978fc..8b14ac232 100644 --- a/nebula-logger/main/log-management/permissionsets/LoggerEndUser.permissionset-meta.xml +++ b/nebula-logger/main/log-management/permissionsets/LoggerEndUser.permissionset-meta.xml @@ -25,7 +25,7 @@ - View shared logs & log entries false - LogEntry__c.DmlResultType__c + LogEntry__c.DatabaseResultType__c true diff --git a/nebula-logger/main/log-management/permissionsets/LoggerLogViewer.permissionset-meta.xml b/nebula-logger/main/log-management/permissionsets/LoggerLogViewer.permissionset-meta.xml index 08bf855e8..9fc8a6b30 100644 --- a/nebula-logger/main/log-management/permissionsets/LoggerLogViewer.permissionset-meta.xml +++ b/nebula-logger/main/log-management/permissionsets/LoggerLogViewer.permissionset-meta.xml @@ -7,12 +7,12 @@ Provides access to view all logs false - LogEntry__c.DmlResultErrors__c + LogEntry__c.DatabaseResultJson__c true false - LogEntry__c.DmlResultType__c + LogEntry__c.DatabaseResultType__c true @@ -30,6 +30,11 @@ LogEntry__c.ExceptionType__c true + + false + LogEntry__c.HasDatabaseResult__c + true + false LogEntry__c.HasExceptionStackTrace__c diff --git a/nebula-logger/main/log-management/profiles/Admin.profile-meta.xml b/nebula-logger/main/log-management/profiles/Admin.profile-meta.xml index 3015a061f..e801f8358 100644 --- a/nebula-logger/main/log-management/profiles/Admin.profile-meta.xml +++ b/nebula-logger/main/log-management/profiles/Admin.profile-meta.xml @@ -112,12 +112,12 @@ false - LogEntryEvent__e.DmlResultErrors__c + LogEntryEvent__e.DatabaseResultJson__c true false - LogEntryEvent__e.DmlResultType__c + LogEntryEvent__e.DatabaseResultType__c true @@ -582,12 +582,12 @@ false - LogEntry__c.DmlResultErrors__c + LogEntry__c.DatabaseResultJson__c true false - LogEntry__c.DmlResultType__c + LogEntry__c.DatabaseResultType__c true @@ -605,6 +605,11 @@ LogEntry__c.ExceptionType__c true + + false + LogEntry__c.HasDatabaseResult__c + true + false LogEntry__c.HasExceptionStackTrace__c diff --git a/nebula-logger/main/logger-engine/classes/FlowLogEntry.cls b/nebula-logger/main/logger-engine/classes/FlowLogEntry.cls index 13f5082d4..f3ed146a3 100644 --- a/nebula-logger/main/logger-engine/classes/FlowLogEntry.cls +++ b/nebula-logger/main/logger-engine/classes/FlowLogEntry.cls @@ -13,7 +13,7 @@ global inherited sharing class FlowLogEntry { /** * @description The name of the Flow creating the log entry. - * Due to Salesforce limitations, this cannot be automatically determined. + * Due to Salesforce limitations, this cannot be automatically determined. */ @InvocableVariable(required=true label='Flow or Process Builder Name') global String flowName; @@ -31,19 +31,19 @@ global inherited sharing class FlowLogEntry { global Boolean saveLog = true; /** - * @description Optionally relate the log entry to a particular record ID. + * @description Optionally relate the log entry to a particular record ID */ @InvocableVariable(required=false label='(Optional) Record ID') global Id recordId; /** - * @description Optionally specify a logging level. The default is 'DEBUG' + * @description Optionally specify a logging level - the default is 'DEBUG' */ @InvocableVariable(required=false label='(Optional) Logging Level') global String loggingLevelName = 'DEBUG'; /** - * @description Optionally provide a list of topics to dynamically assign to the log entry. + * @description Optionally provide a list of topics to dynamically assign to the log entry */ @InvocableVariable(required=false label='(Optional) Topics') public List topics; @@ -53,7 +53,7 @@ global inherited sharing class FlowLogEntry { /** * addFlowEntries description * @param flowLogEntries The list of FlowLogEntry instances to save - * @return The current transaction's ID (based on Logger.getTransactionId()) + * @return The current transaction's ID (based on `Logger.getTransactionId()`) */ @InvocableMethod(category='Logging' label='Add Log Entry' description='Creates a log entry for a flow or process builder') global static List addFlowEntries(List flowLogEntries) { @@ -84,6 +84,14 @@ global inherited sharing class FlowLogEntry { Logger.saveLog(); } - return new List{ Logger.getTransactionId() }; + // Event though it's the same transaction ID, Salesforce expects the returned list... + // ...to have the same number of items as the initial input. + // When there's a mismatch, Salesforce throws an error: + // FLOW_ELEMENT_ERROR The number of results does not match the number of interviews that were executed in a single bulk execution request.|FlowActionCall + List transactionIds = new List(); + for (Integer i = 0; i < flowLogEntries.size(); i++) { + transactionIds.add(Logger.getTransactionId()); + } + return transactionIds; } } diff --git a/nebula-logger/main/logger-engine/classes/FlowRecordLogEntry.cls b/nebula-logger/main/logger-engine/classes/FlowRecordLogEntry.cls index 825ce7c4e..45ae9c183 100644 --- a/nebula-logger/main/logger-engine/classes/FlowRecordLogEntry.cls +++ b/nebula-logger/main/logger-engine/classes/FlowRecordLogEntry.cls @@ -5,7 +5,7 @@ /** * @group logger-engine - * @description Handles adding new log entries in Flow for a particular SObject record + * @description Handles adding new log entries in Flow for a particular `SObject` record * @see FlowLogEntry * @see Logger * @see LogEntryEventBuilder @@ -13,37 +13,37 @@ global inherited sharing class FlowRecordLogEntry { /** * @description The name of the Flow creating the log entry. - * Due to Salesforce limitations, this cannot be automatically determined. + * Due to Salesforce limitations, this cannot be automatically determined */ @InvocableVariable(required=true label='Flow or Process Builder Name') global String flowName; /** - * @description The message to log. + * @description The message to log */ @InvocableVariable(required=true label='Log Entry Message') global String message; /** - * @description The record to relate to this log entry. The record's JSON will be automatically added to the entry. + * @description The record to relate to this log entry - the record's JSON is automatically added to the log entry */ @InvocableVariable(required=true label='Record') global SObject record; /** - * @description Optionally choose to save any pending log entries. + * @description Optionally choose to save any pending log entries */ @InvocableVariable(required=false label='(Optional) Save Log') global Boolean saveLog = true; /** - * @description Optionally specify a logging level. The default is 'DEBUG' + * @description Optionally specify a logging level - the default is 'DEBUG' */ @InvocableVariable(required=false label='(Optional) Logging Level') global String loggingLevelName = 'DEBUG'; /** - * @description Optionally provide a list of topics to dynamically assign to the log entry. + * @description Optionally provide a list of topics to dynamically assign to the log entry */ @InvocableVariable(required=false label='(Optional) Topics') public List topics; @@ -53,7 +53,7 @@ global inherited sharing class FlowRecordLogEntry { /** * addFlowRecordEntries description * @param flowRecordLogEntries The list of FlowRecordLogEntry instances to save - * @return The current transaction's ID (based on Logger.getTransactionId()) + * @return The current transaction's ID (based on `Logger.getTransactionId()`) */ @InvocableMethod( category='Logging' @@ -86,6 +86,15 @@ global inherited sharing class FlowRecordLogEntry { if (saveLog) { Logger.saveLog(); } - return new List{ Logger.getTransactionId() }; + + // Event though it's the same transaction ID, Salesforce expects the returned list... + // ...to have the same number of items as the initial input. + // When there's a mismatch, Salesforce throws an error: + // FLOW_ELEMENT_ERROR The number of results does not match the number of interviews that were executed in a single bulk execution request.|FlowActionCall + List transactionIds = new List(); + for (Integer i = 0; i < flowRecordLogEntries.size(); i++) { + transactionIds.add(Logger.getTransactionId()); + } + return transactionIds; } } diff --git a/nebula-logger/main/logger-engine/classes/LogEntryEventBuilder.cls b/nebula-logger/main/logger-engine/classes/LogEntryEventBuilder.cls index 19f2bca42..84a8ff2ad 100644 --- a/nebula-logger/main/logger-engine/classes/LogEntryEventBuilder.cls +++ b/nebula-logger/main/logger-engine/classes/LogEntryEventBuilder.cls @@ -5,7 +5,7 @@ /** * @group logger-engine - * @description Builder class that generates each LogEntryEvent__c record + * @description Builder class that generates each `LogEntryEvent__c` record * @see Logger */ global with sharing class LogEntryEventBuilder { @@ -30,6 +30,12 @@ global with sharing class LogEntryEventBuilder { private Boolean detailsAreSet = false; private Boolean shouldSave; + /** + * @description Used by `Logger` to instantiate a new instance of `LogEntryEventBuilder` + * @param loggingLevel The `LoggingLevel` enum to use for the builder's instance of `LogEntryEvent__e` + * @param shouldSave Determines if the builder's instance of `LogEntryEvent__e` should be saved + * @return The new instance of `LogEntryEventBuilder` + */ public LogEntryEventBuilder(LoggingLevel loggingLevel, Boolean shouldSave) { this.loggingLevel = loggingLevel; @@ -74,9 +80,9 @@ global with sharing class LogEntryEventBuilder { } /** - * Sets the log entry event's message field - * @param logMessage The instance of LogMessage to use - LogMessage.getMessage() will be used - * @return The same instance of LogEntryEventBuilder, useful for chaining methods + * @description Sets the log entry event's message field + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @return The same instance of `LogEntryEventBuilder`, useful for chaining methods */ global LogEntryEventBuilder setMessage(LogMessage logMessage) { if (this.shouldSave == false) { @@ -87,9 +93,9 @@ global with sharing class LogEntryEventBuilder { } /** - * Sets the log entry event's message field - * @param message The instance of LogMessage to use - LogMessage.getMessage() will be used - * @return The same instance of LogEntryEventBuilder, useful for chaining methods + * @description Sets the log entry event's message field + * @param message The string to use to set the entry's message field + * @return The same instance of `LogEntryEventBuilder`, useful for chaining methods */ global LogEntryEventBuilder setMessage(String message) { if (this.shouldSave == false) { @@ -112,9 +118,9 @@ global with sharing class LogEntryEventBuilder { } /** - * Sets the log entry event's exception fields - * @param apexException The instance of an Exception to use. - * @return The same instance of LogEntryEventBuilder, useful for chaining methods + * @description Sets the log entry event's exception fields + * @param apexException The instance of an `Exception` to use. + * @return The same instance of `LogEntryEventBuilder`, useful for chaining methods */ global LogEntryEventBuilder setExceptionDetails(Exception apexException) { if (this.shouldSave == false) { @@ -136,104 +142,90 @@ global with sharing class LogEntryEventBuilder { // ...but Salesforce didn't bother to use an interface for the classes, so instead - overloads! /** * @description Sets the log entry event's DML result fields - * @param deleteResult The instance of Database.DeleteResult to log - * @return The same instance of LogEntryEventBuilder, useful for chaining methods + * @param deleteResult The instance of `Database.DeleteResult` to log + * @return The same instance of `LogEntryEventBuilder`, useful for chaining methods */ - global LogEntryEventBuilder setDmlResult(Database.DeleteResult deleteResult) { + global LogEntryEventBuilder setDatabaseResult(Database.DeleteResult deleteResult) { if (deleteResult == null) { return this; } - this.logEntryEvent.DmlResultType__c = Database.DeleteResult.class.getName(); - - if (deleteResult.isSuccess() == false) { - this.logEntryEvent.DmlResultErrors__c = Json.serializePretty(deleteResult.getErrors()); - } + this.logEntryEvent.DatabaseResultJson__c = JSON.serializePretty(deleteResult); + this.logEntryEvent.DatabaseResultType__c = Database.DeleteResult.class.getName(); return this.setRecordId(deleteResult.getId()); } /** * @description Sets the log entry event's DML result fields - * @param mergeResult The instance of Database.MergeResult to log - * @return The same instance of LogEntryEventBuilder, useful for chaining methods + * @param mergeResult The instance of `Database.MergeResult` to log + * @return The same instance of `LogEntryEventBuilder`, useful for chaining methods */ - global LogEntryEventBuilder setDmlResult(Database.MergeResult mergeResult) { + global LogEntryEventBuilder setDatabaseResult(Database.MergeResult mergeResult) { if (mergeResult == null) { return this; } - this.logEntryEvent.DmlResultType__c = Database.MergeResult.class.getName(); - - if (mergeResult.isSuccess() == false) { - this.logEntryEvent.DmlResultErrors__c = Json.serializePretty(mergeResult.getErrors()); - } + this.logEntryEvent.DatabaseResultJson__c = JSON.serializePretty(mergeResult); + this.logEntryEvent.DatabaseResultType__c = Database.MergeResult.class.getName(); return this.setRecordId(mergeResult.getId()); } /** * @description Sets the log entry event's DML result fields - * @param saveResult The instance of Database.SaveResult to log - * @return The same instance of LogEntryEventBuilder, useful for chaining methods + * @param saveResult The instance of `Database.SaveResult` to log + * @return The same instance of `LogEntryEventBuilder`, useful for chaining methods */ - global LogEntryEventBuilder setDmlResult(Database.SaveResult saveResult) { + global LogEntryEventBuilder setDatabaseResult(Database.SaveResult saveResult) { if (saveResult == null) { return this; } - this.logEntryEvent.DmlResultType__c = Database.SaveResult.class.getName(); - - if (saveResult.isSuccess() == false) { - this.logEntryEvent.DmlResultErrors__c = Json.serializePretty(saveResult.getErrors()); - } + this.logEntryEvent.DatabaseResultJson__c = JSON.serializePretty(saveResult); + this.logEntryEvent.DatabaseResultType__c = Database.SaveResult.class.getName(); return this.setRecordId(saveResult.getId()); } /** * @description Sets the log entry event's DML result fields - * @param upsertResult The instance of Database.UpsertResult to log - * @return The same instance of LogEntryEventBuilder, useful for chaining methods + * @param upsertResult The instance of `Database.UpsertResult` to log + * @return The same instance of `LogEntryEventBuilder`, useful for chaining methods */ - global LogEntryEventBuilder setDmlResult(Database.UpsertResult upsertResult) { + global LogEntryEventBuilder setDatabaseResult(Database.UpsertResult upsertResult) { if (upsertResult == null) { return this; } // Upsert has 2 subtypes (surprise!) - insert and update - so, UpsertResult has an extra method to take into account String subtype = upsertResult.isCreated() ? 'Insert' : 'Update'; - this.logEntryEvent.DmlResultType__c = Database.UpsertResult.class.getName() + '.' + subtype; - - if (upsertResult.isSuccess() == false) { - this.logEntryEvent.DmlResultErrors__c = Json.serializePretty(upsertResult.getErrors()); - } + this.logEntryEvent.DatabaseResultJson__c = JSON.serializePretty(upsertResult); + this.logEntryEvent.DatabaseResultType__c = Database.UpsertResult.class.getName() + '.' + subtype; return this.setRecordId(upsertResult.getId()); } /** * @description Sets the log entry event's DML result fields - * @param undeleteResult The instance of Database.UndeleteResult to log - * @return The same instance of LogEntryEventBuilder, useful for chaining methods + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @return The same instance of `LogEntryEventBuilder`, useful for chaining methods */ - global LogEntryEventBuilder setDmlResult(Database.UndeleteResult undeleteResult) { + global LogEntryEventBuilder setDatabaseResult(Database.UndeleteResult undeleteResult) { if (undeleteResult == null) { return this; } - this.logEntryEvent.DmlResultType__c = Database.UndeleteResult.class.getName(); - if (undeleteResult.isSuccess() == false) { - this.logEntryEvent.DmlResultErrors__c = Json.serializePretty(undeleteResult.getErrors()); - } + this.logEntryEvent.DatabaseResultJson__c = JSON.serializePretty(undeleteResult); + this.logEntryEvent.DatabaseResultType__c = Database.UndeleteResult.class.getName(); return this.setRecordId(undeleteResult.getId()); } /** - * Sets the log entry event's record fields - * @param record The SObject record related to the entry. The JSON of the record is automatically added to the entry - * @return The same instance of LogEntryEventBuilder, useful for chaining methods + * @description Sets the log entry event's record fields + * @param record The `SObject` record related to the entry. The JSON of the record is automatically added to the entry + * @return The same instance of `LogEntryEventBuilder`, useful for chaining methods */ global LogEntryEventBuilder setRecordId(SObject record) { if (this.shouldSave == false) { @@ -249,16 +241,16 @@ global with sharing class LogEntryEventBuilder { this.logEntryEvent.RecordSObjectType__c = record.getSObjectType().getDescribe().getName(); this.logEntryEvent.RecordSObjectTypeNamespace__c = getSObjectTypeNamespace(record.getSObjectType()); - String truncatedRecordJson = truncateFieldValue(Schema.LogEntryEvent__e.RecordJson__c, Json.serializePretty(record)); + String truncatedRecordJson = truncateFieldValue(Schema.LogEntryEvent__e.RecordJson__c, JSON.serializePretty(record)); this.logEntryEvent.RecordJson__c = truncatedRecordJson; return this; } /** - * Sets the log entry event's record fields + * @description Sets the log entry event's record fields * @param recordId The ID of the SObject record related to the entry - * @return The same instance of LogEntryEventBuilder, useful for chaining methods + * @return The same instance of `LogEntryEventBuilder`, useful for chaining methods */ global LogEntryEventBuilder setRecordId(Id recordId) { if (this.shouldSave == false) { @@ -276,9 +268,9 @@ global with sharing class LogEntryEventBuilder { } /** - * Sets a comma-separate list of strings on the LogEntryEvent__e, which ultimately becomes Topic & TopicAssignment records on Log__c and LogEntry__c + * @description Sets a comma-separate list of strings on the LogEntryEvent__e, which ultimately becomes Topic & TopicAssignment records on Log__c and LogEntry__c * @param topics The list of strings to use as topics for the current entry - * @return The same instance of LogEntryEventBuilder, useful for chaining methods + * @return The same instance of `LogEntryEventBuilder`, useful for chaining methods */ public LogEntryEventBuilder setTopics(List topics) { if (this.shouldSave == false) { @@ -290,9 +282,9 @@ global with sharing class LogEntryEventBuilder { } /** - * Parses the provided stack trace and sets the log entry's origin & stack trace fields + * @description Parses the provided stack trace and sets the log entry's origin & stack trace fields * @param stackTraceString The Apex stack trace string to parse - * @return The same instance of LogEntryEventBuilder, useful for chaining methods + * @return The same instance of `LogEntryEventBuilder`, useful for chaining methods */ global LogEntryEventBuilder parseStackTrace(String stackTraceString) { if (this.shouldSave == false) { @@ -342,7 +334,7 @@ global with sharing class LogEntryEventBuilder { } /** - * Determines if this instance of LogEntryEventBuilder should be saved the next time that Logger.saveLog() is called + * @description Determines if this instance of `LogEntryEventBuilder` should be saved the next time that `Logger.saveLog()` is called * @return Boolean */ public Boolean shouldSave() { @@ -350,8 +342,8 @@ global with sharing class LogEntryEventBuilder { } /** - * Returns the LogEntryEvent__e record for this instance of LogEntryEventBuilder - * @return The LogEntryEvent__e record + * @description Returns the `LogEntryEvent__e` record for this instance of LogEntryEventBuilder + * @return The `LogEntryEvent__e` record */ public LogEntryEvent__e getLogEntryEvent() { if (this.shouldSave == false) { @@ -556,7 +548,7 @@ global with sharing class LogEntryEventBuilder { // Private static methods private static String getApiVersion() { - String userJson = Json.serialize(new User(Id = UserInfo.getUserId())); + String userJson = JSON.serialize(new User(Id = UserInfo.getUserId())); return userJson.substringAfter('/data/').substringBefore('.0/sobjects/'); } diff --git a/nebula-logger/main/logger-engine/classes/LogMessage.cls b/nebula-logger/main/logger-engine/classes/LogMessage.cls index 81c319171..97e422d91 100644 --- a/nebula-logger/main/logger-engine/classes/LogMessage.cls +++ b/nebula-logger/main/logger-engine/classes/LogMessage.cls @@ -15,7 +15,7 @@ global inherited sharing virtual class LogMessage { private List messageInputs; /** - * Constructor to handle dynamically formatting a string with 1 input + * @description Constructor to handle dynamically formatting a string with 1 input * @param unformattedMessage The base string to use for your log message * @param messageInput The replacement text to use for 1 placeholder in the unformatted message * @example @@ -27,7 +27,7 @@ global inherited sharing virtual class LogMessage { } /** - * Constructor to handle dynamically formatting a string with 2 inputs + * @description Constructor to handle dynamically formatting a string with 2 inputs * @param unformattedMessage The base string to use for your log message * @param messageInput1 The replacement text to use for the first placeholder in the unformatted message * @param messageInput2 The replacement text to use for the second placeholder in the unformatted message @@ -41,7 +41,7 @@ global inherited sharing virtual class LogMessage { } /** - * Constructor to handle dynamically formatting a string with 3 inputs + * @description Constructor to handle dynamically formatting a string with 3 inputs * @param unformattedMessage The base string to use for your log message * @param messageInput1 The replacement text to use for the first placeholder in the unformatted message * @param messageInput2 The replacement text to use for the second placeholder in the unformatted message @@ -56,7 +56,7 @@ global inherited sharing virtual class LogMessage { } /** - * Constructor to handle dynamically formatting a string with a list of inputs + * @description Constructor to handle dynamically formatting a string with a list of inputs * @param unformattedMessage The base string to use for your log message * @param messageInputs The list of inputs text to use for any placeholders in the unformatted message * @example @@ -74,7 +74,7 @@ global inherited sharing virtual class LogMessage { } /** - * Returns the formatted string to use as the log entry's message + * @description Returns the formatted string to use as the log entry's message * @return String */ global virtual String getMessage() { diff --git a/nebula-logger/main/logger-engine/classes/Logger.cls b/nebula-logger/main/logger-engine/classes/Logger.cls index 82a071fb5..1f8b21fb1 100644 --- a/nebula-logger/main/logger-engine/classes/Logger.cls +++ b/nebula-logger/main/logger-engine/classes/Logger.cls @@ -32,7 +32,7 @@ global with sharing class Logger { } /** - * Enum used to control how LogEntryEvent__e records are inserted + * @description Enum used to control how LogEntryEvent__e records are inserted */ global enum SaveMethod { EVENT_BUS, @@ -43,7 +43,7 @@ global with sharing class Logger { // Settings management methods /** - * Returns the unique ID for a particular transaction, stored in Log__c.TransactionId__c + * @description Returns the unique ID for a particular transaction, stored in Log__c.TransactionId__c * @return String - The value of System.Request.getCurrent().getRequestId() */ global static String getTransactionId() { @@ -51,7 +51,7 @@ global with sharing class Logger { } /** - * Returns the Quiddity context of the current transaction. + * @description Returns the Quiddity context of the current transaction. * @return Quiddity - The value of System.Request.getCurrent().getQuiddity() */ global static Quiddity getCurrentQuiddity() { @@ -59,8 +59,8 @@ global with sharing class Logger { } /** - * Relates the current transaction's log to a parent log via the field Log__c.ParentLog__c - * This is useful for relating multiple asynchronous operations together, such as batch & queueable jobs. + * @description Relates the current transaction's log to a parent log via the field Log__c.ParentLog__c + * This is useful for relating multiple asynchronous operations together, such as batch & queueable jobs. * @param parentTransactionId - The transaction ID of the original parent transaction */ global static void setParentLogTransactionId(String parentTransactionId) { @@ -68,7 +68,7 @@ global with sharing class Logger { } /** - * Returns the transaction ID value that will be used to relate the current transaction's log to a parent log + * @description Returns the transaction ID value that will be used to relate the current transaction's log to a parent log * @return String - The parent log's transaction ID. This must be explicitly set by calling setParentLogTransactionId(String) */ global static String getParentLogTransactionId() { @@ -76,7 +76,7 @@ global with sharing class Logger { } /** - * Indicates if logging has been enabled for the current user, based on the custom setting LoggerSettings__c + * @description Indicates if logging has been enabled for the current user, based on the custom setting LoggerSettings__c * @return Boolean */ global static Boolean isEnabled() { @@ -84,7 +84,7 @@ global with sharing class Logger { } /** - * Indicates if logging for the specified logging level is enabled for the current user, based on the custom setting LoggerSettings__c + * @description Indicates if logging for the specified logging level is enabled for the current user, based on the custom setting LoggerSettings__c * @param loggingLevel - The logging level to check * @return Boolean */ @@ -93,7 +93,7 @@ global with sharing class Logger { } /** - * Indicates if logging level 'ERROR' is enabled for the current user, based on the custom setting LoggerSettings__c + * @description Indicates if logging level 'ERROR' is enabled for the current user, based on the custom setting LoggerSettings__c * @return Boolean */ global static Boolean isErrorEnabled() { @@ -101,7 +101,7 @@ global with sharing class Logger { } /** - * Indicates if logging level 'WARN' is enabled for the current user, based on the custom setting LoggerSettings__c + * @description Indicates if logging level 'WARN' is enabled for the current user, based on the custom setting LoggerSettings__c * @return Boolean */ global static Boolean isWarnEnabled() { @@ -109,7 +109,7 @@ global with sharing class Logger { } /** - * Indicates if logging level 'INFO' is enabled for the current user, based on the custom setting LoggerSettings__c + * @description Indicates if logging level 'INFO' is enabled for the current user, based on the custom setting LoggerSettings__c * @return Boolean */ global static Boolean isInfoEnabled() { @@ -117,7 +117,7 @@ global with sharing class Logger { } /** - * Indicates if logging level 'DEBUG' is enabled for the current user, based on the custom setting LoggerSettings__c + * @description Indicates if logging level 'DEBUG' is enabled for the current user, based on the custom setting LoggerSettings__c * @return Boolean */ global static Boolean isDebugEnabled() { @@ -125,7 +125,7 @@ global with sharing class Logger { } /** - * Indicates if logging level 'FINE' is enabled for the current user, based on the custom setting LoggerSettings__c + * @description Indicates if logging level 'FINE' is enabled for the current user, based on the custom setting LoggerSettings__c * @return Boolean */ global static Boolean isFineEnabled() { @@ -133,7 +133,7 @@ global with sharing class Logger { } /** - * Indicates if logging level 'FINER' is enabled for the current user, based on the custom setting LoggerSettings__c + * @description Indicates if logging level 'FINER' is enabled for the current user, based on the custom setting LoggerSettings__c * @return Boolean */ global static Boolean isFinerEnabled() { @@ -141,7 +141,7 @@ global with sharing class Logger { } /** - * Indicates if logging level 'FINEST' is enabled for the current user, based on the custom setting LoggerSettings__c + * @description Indicates if logging level 'FINEST' is enabled for the current user, based on the custom setting LoggerSettings__c * @return Boolean */ global static Boolean isFinestEnabled() { @@ -149,7 +149,7 @@ global with sharing class Logger { } /** - * Indicates if the specified logging level is enabled for the current user, based on the custom setting LoggerSettings__c + * @description Indicates if the specified logging level is enabled for the current user, based on the custom setting LoggerSettings__c * @return Boolean */ global static Boolean meetsUserLoggingLevel(LoggingLevel logEntryLoggingLevel) { @@ -157,7 +157,7 @@ global with sharing class Logger { } /** - * Returns the logging level for the current user, based on the custom setting LoggerSettings__c + * @description Returns the logging level for the current user, based on the custom setting LoggerSettings__c * @return LoggingLevel - The matching instance of LoggingLevel */ global static LoggingLevel getUserLoggingLevel() { @@ -167,7 +167,7 @@ global with sharing class Logger { // Transaction control methods /** - * Indicates if saving has been temporarily suspended for the current transaction + * @description Indicates if saving has been temporarily suspended for the current transaction * @return Boolean */ global static Boolean isSavingSuspended() { @@ -175,23 +175,23 @@ global with sharing class Logger { } /** - * Pauses saving for the current transaction. - * Any calls to saveLog() are ignored until saving is resumed. + * @description Pauses saving for the current transaction. + * Any calls to saveLog() are ignored until saving is resumed. */ global static void suspendSaving() { suspendSaving = true; } /** - * Resumes saving for the current transaction, used to reverse suspendSaving(). - * Any calls to saveLog() are ignored until saving is resumed. + * @description Resumes saving for the current transaction, used to reverse suspendSaving(). + * Any calls to saveLog() are ignored until saving is resumed. */ global static void resumeSaving() { suspendSaving = false; } /** - * Returns the number of entries that have been generated but not yet saved + * @description Returns the number of entries that have been generated but not yet saved * @return Integer */ global static Integer getBufferSize() { @@ -199,1014 +199,2614 @@ global with sharing class Logger { } /** - * Discards any entries that have been generated but not yet saved + * @description Discards any entries that have been generated but not yet saved */ global static void flushBuffer() { LOG_ENTRIES_BUFFER.clear(); } // ERROR logging level methods + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder error(LogMessage logMessage, Database.DeleteResult deleteResult, List topics) { - return error().setMessage(logMessage).setDmlResult(deleteResult).setTopics(topics); + return error().setMessage(logMessage).setDatabaseResult(deleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder error(LogMessage logMessage, Database.DeleteResult deleteResult) { - return error().setMessage(logMessage).setDmlResult(deleteResult); + return error().setMessage(logMessage).setDatabaseResult(deleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder error(LogMessage logMessage, Database.MergeResult mergeResult, List topics) { - return error().setMessage(logMessage).setDmlResult(mergeResult).setTopics(topics); + return error().setMessage(logMessage).setDatabaseResult(mergeResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder error(LogMessage logMessage, Database.MergeResult mergeResult) { - return error().setMessage(logMessage).setDmlResult(mergeResult); + return error().setMessage(logMessage).setDatabaseResult(mergeResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder error(LogMessage logMessage, Database.SaveResult saveResult, List topics) { - return error().setMessage(logMessage).setDmlResult(saveResult).setTopics(topics); + return error().setMessage(logMessage).setDatabaseResult(saveResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder error(LogMessage logMessage, Database.SaveResult saveResult) { - return error().setMessage(logMessage).setDmlResult(saveResult); + return error().setMessage(logMessage).setDatabaseResult(saveResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder error(LogMessage logMessage, Database.UndeleteResult undeleteResult, List topics) { - return error().setMessage(logMessage).setDmlResult(undeleteResult).setTopics(topics); + return error().setMessage(logMessage).setDatabaseResult(undeleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder error(LogMessage logMessage, Database.UndeleteResult undeleteResult) { - return error().setMessage(logMessage).setDmlResult(undeleteResult); + return error().setMessage(logMessage).setDatabaseResult(undeleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder error(LogMessage logMessage, Database.UpsertResult upsertResult, List topics) { - return error().setMessage(logMessage).setDmlResult(upsertResult).setTopics(topics); + return error().setMessage(logMessage).setDatabaseResult(upsertResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder error(LogMessage logMessage, Database.UpsertResult upsertResult) { - return error().setMessage(logMessage).setDmlResult(upsertResult); + return error().setMessage(logMessage).setDatabaseResult(upsertResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param apexException The instance of `Exception` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder error(LogMessage logMessage, Exception apexException, List topics) { return error().setMessage(logMessage).setExceptionDetails(apexException).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param apexException The instance of `Exception` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder error(LogMessage logMessage, Exception apexException) { return error().setMessage(logMessage).setExceptionDetails(apexException); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @param apexException The instance of `Exception` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder error(LogMessage logMessage, Id recordId, Exception apexException, List topics) { return error().setMessage(logMessage).setRecordId(recordId).setExceptionDetails(apexException).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @param apexException The instance of `Exception` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder error(LogMessage logMessage, Id recordId, Exception apexException) { return error().setMessage(logMessage).setRecordId(recordId).setExceptionDetails(apexException); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder error(LogMessage logMessage, Id recordId, List topics) { return error().setMessage(logMessage).setRecordId(recordId).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder error(LogMessage logMessage, Id recordId) { return error().setMessage(logMessage).setRecordId(recordId); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder error(LogMessage logMessage, List topics) { return error().setMessage(logMessage).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param record The `SObject` record to log + * @param apexException The instance of `Exception` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder error(LogMessage logMessage, SObject record, Exception apexException, List topics) { return error().setMessage(logMessage).setRecordId(record).setExceptionDetails(apexException).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param record The `SObject` record to log + * @param apexException The instance of `Exception` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder error(LogMessage logMessage, SObject record, Exception apexException) { return error().setMessage(logMessage).setRecordId(record).setExceptionDetails(apexException); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param record The `SObject` record to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder error(LogMessage logMessage, SObject record, List topics) { return error().setMessage(logMessage).setRecordId(record).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param record The `SObject` record to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder error(LogMessage logMessage, SObject record) { return error().setMessage(logMessage).setRecordId(record); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder error(LogMessage logMessage) { return error().setMessage(logMessage); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param message The string to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder error(String message, Database.DeleteResult deleteResult, List topics) { - return error().setMessage(message).setDmlResult(deleteResult).setTopics(topics); + return error().setMessage(message).setDatabaseResult(deleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param message The string to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder error(String message, Database.DeleteResult deleteResult) { - return error().setMessage(message).setDmlResult(deleteResult); + return error().setMessage(message).setDatabaseResult(deleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param message The string to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder error(String message, Database.MergeResult mergeResult, List topics) { - return error().setMessage(message).setDmlResult(mergeResult).setTopics(topics); + return error().setMessage(message).setDatabaseResult(mergeResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param message The string to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder error(String message, Database.MergeResult mergeResult) { - return error().setMessage(message).setDmlResult(mergeResult); + return error().setMessage(message).setDatabaseResult(mergeResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param message The string to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder error(String message, Database.SaveResult saveResult, List topics) { - return error().setMessage(message).setDmlResult(saveResult).setTopics(topics); + return error().setMessage(message).setDatabaseResult(saveResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param message The string to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder error(String message, Database.SaveResult saveResult) { - return error().setMessage(message).setDmlResult(saveResult); + return error().setMessage(message).setDatabaseResult(saveResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param message The string to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder error(String message, Database.UndeleteResult undeleteResult, List topics) { - return error().setMessage(message).setDmlResult(undeleteResult).setTopics(topics); + return error().setMessage(message).setDatabaseResult(undeleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param message The string to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder error(String message, Database.UndeleteResult undeleteResult) { - return error().setMessage(message).setDmlResult(undeleteResult); + return error().setMessage(message).setDatabaseResult(undeleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param message The string to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder error(String message, Database.UpsertResult upsertResult, List topics) { - return error().setMessage(message).setDmlResult(upsertResult).setTopics(topics); + return error().setMessage(message).setDatabaseResult(upsertResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param message The string to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder error(String message, Database.UpsertResult upsertResult) { - return error().setMessage(message).setDmlResult(upsertResult); + return error().setMessage(message).setDatabaseResult(upsertResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param message The string to use to set the entry's message field + * @param apexException The instance of `Exception` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder error(String message, Exception apexException, List topics) { return error().setMessage(message).setExceptionDetails(apexException).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param message The string to use to set the entry's message field + * @param apexException The instance of `Exception` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder error(String message, Exception apexException) { return error().setMessage(message).setExceptionDetails(apexException); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param message The string to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @param apexException The instance of `Exception` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder error(String message, Id recordId, Exception apexException, List topics) { return error().setMessage(message).setRecordId(recordId).setExceptionDetails(apexException).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param message The string to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @param apexException The instance of `Exception` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder error(String message, Id recordId, Exception apexException) { return error().setMessage(message).setRecordId(recordId).setExceptionDetails(apexException); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param message The string to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder error(String message, Id recordId, List topics) { return error().setMessage(message).setRecordId(recordId).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param message The string to use to set the entry's message field + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder error(String message, Id recordId) { return error().setMessage(message).setRecordId(recordId); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param message The string to use to set the entry's message field + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder error(String message, List topics) { return error().setMessage(message).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param message The string to use to set the entry's message field + * @param record The `SObject` record to log + * @param apexException The instance of `Exception` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder error(String message, SObject record, Exception apexException, List topics) { return error().setMessage(message).setRecordId(record).setExceptionDetails(apexException).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param message The string to use to set the entry's message field + * @param record The `SObject` record to log + * @param apexException The instance of `Exception` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder error(String message, SObject record, Exception apexException) { return error().setMessage(message).setRecordId(record).setExceptionDetails(apexException); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param message The string to use to set the entry's message field + * @param record The `SObject` record to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder error(String message, SObject record, List topics) { return error().setMessage(message).setRecordId(record).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param message The string to use to set the entry's message field + * @param record The `SObject` record to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder error(String message, SObject record) { return error().setMessage(message).setRecordId(record); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.ERROR` + * @param message The string to use to set the entry's message field + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder error(String message) { return error().setMessage(message); } // WARN logging level methods + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder warn(LogMessage logMessage, Database.DeleteResult deleteResult, List topics) { - return warn().setMessage(logMessage).setDmlResult(deleteResult).setTopics(topics); + return warn().setMessage(logMessage).setDatabaseResult(deleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder warn(LogMessage logMessage, Database.DeleteResult deleteResult) { - return warn().setMessage(logMessage).setDmlResult(deleteResult); + return warn().setMessage(logMessage).setDatabaseResult(deleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder warn(LogMessage logMessage, Database.MergeResult mergeResult, List topics) { - return warn().setMessage(logMessage).setDmlResult(mergeResult).setTopics(topics); + return warn().setMessage(logMessage).setDatabaseResult(mergeResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder warn(LogMessage logMessage, Database.MergeResult mergeResult) { - return warn().setMessage(logMessage).setDmlResult(mergeResult); + return warn().setMessage(logMessage).setDatabaseResult(mergeResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder warn(LogMessage logMessage, Database.SaveResult saveResult, List topics) { - return warn().setMessage(logMessage).setDmlResult(saveResult).setTopics(topics); + return warn().setMessage(logMessage).setDatabaseResult(saveResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder warn(LogMessage logMessage, Database.SaveResult saveResult) { - return warn().setMessage(logMessage).setDmlResult(saveResult); + return warn().setMessage(logMessage).setDatabaseResult(saveResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder warn(LogMessage logMessage, Database.UndeleteResult undeleteResult, List topics) { - return warn().setMessage(logMessage).setDmlResult(undeleteResult).setTopics(topics); + return warn().setMessage(logMessage).setDatabaseResult(undeleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder warn(LogMessage logMessage, Database.UndeleteResult undeleteResult) { - return warn().setMessage(logMessage).setDmlResult(undeleteResult); + return warn().setMessage(logMessage).setDatabaseResult(undeleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder warn(LogMessage logMessage, Database.UpsertResult upsertResult, List topics) { - return warn().setMessage(logMessage).setDmlResult(upsertResult).setTopics(topics); + return warn().setMessage(logMessage).setDatabaseResult(upsertResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder warn(LogMessage logMessage, Database.UpsertResult upsertResult) { - return warn().setMessage(logMessage).setDmlResult(upsertResult); + return warn().setMessage(logMessage).setDatabaseResult(upsertResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param apexException The instance of `Exception` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder warn(LogMessage logMessage, Exception apexException, List topics) { return warn().setMessage(logMessage).setExceptionDetails(apexException).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param apexException The instance of `Exception` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder warn(LogMessage logMessage, Exception apexException) { return warn().setMessage(logMessage).setExceptionDetails(apexException); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @param apexException The instance of `Exception` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder warn(LogMessage logMessage, Id recordId, Exception apexException, List topics) { return warn().setMessage(logMessage).setRecordId(recordId).setExceptionDetails(apexException).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @param apexException The instance of `Exception` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder warn(LogMessage logMessage, Id recordId, Exception apexException) { return warn().setMessage(logMessage).setRecordId(recordId).setExceptionDetails(apexException); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder warn(LogMessage logMessage, Id recordId, List topics) { return warn().setMessage(logMessage).setRecordId(recordId).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder warn(LogMessage logMessage, Id recordId) { return warn().setMessage(logMessage).setRecordId(recordId); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder warn(LogMessage logMessage, List topics) { return warn().setMessage(logMessage).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param record The `SObject` record to log + * @param apexException The instance of `Exception` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder warn(LogMessage logMessage, SObject record, Exception apexException, List topics) { return warn().setMessage(logMessage).setRecordId(record).setExceptionDetails(apexException).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param record The `SObject` record to log + * @param apexException The instance of `Exception` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder warn(LogMessage logMessage, SObject record, Exception apexException) { return warn().setMessage(logMessage).setRecordId(record).setExceptionDetails(apexException); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param record The `SObject` record to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder warn(LogMessage logMessage, SObject record, List topics) { return warn().setMessage(logMessage).setRecordId(record).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param record The `SObject` record to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder warn(LogMessage logMessage, SObject record) { return warn().setMessage(logMessage).setRecordId(record); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder warn(LogMessage logMessage) { return warn().setMessage(logMessage); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param message The string to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder warn(String message, Database.DeleteResult deleteResult, List topics) { - return warn().setMessage(message).setDmlResult(deleteResult).setTopics(topics); + return warn().setMessage(message).setDatabaseResult(deleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param message The string to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder warn(String message, Database.DeleteResult deleteResult) { - return warn().setMessage(message).setDmlResult(deleteResult); + return warn().setMessage(message).setDatabaseResult(deleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param message The string to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder warn(String message, Database.MergeResult mergeResult, List topics) { - return warn().setMessage(message).setDmlResult(mergeResult).setTopics(topics); + return warn().setMessage(message).setDatabaseResult(mergeResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param message The string to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder warn(String message, Database.MergeResult mergeResult) { - return warn().setMessage(message).setDmlResult(mergeResult); + return warn().setMessage(message).setDatabaseResult(mergeResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param message The string to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder warn(String message, Database.SaveResult saveResult, List topics) { - return warn().setMessage(message).setDmlResult(saveResult).setTopics(topics); + return warn().setMessage(message).setDatabaseResult(saveResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param message The string to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder warn(String message, Database.SaveResult saveResult) { - return warn().setMessage(message).setDmlResult(saveResult); + return warn().setMessage(message).setDatabaseResult(saveResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param message The string to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder warn(String message, Database.UndeleteResult undeleteResult, List topics) { - return warn().setMessage(message).setDmlResult(undeleteResult).setTopics(topics); + return warn().setMessage(message).setDatabaseResult(undeleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param message The string to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder warn(String message, Database.UndeleteResult undeleteResult) { - return warn().setMessage(message).setDmlResult(undeleteResult); + return warn().setMessage(message).setDatabaseResult(undeleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param message The string to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder warn(String message, Database.UpsertResult upsertResult, List topics) { - return warn().setMessage(message).setDmlResult(upsertResult).setTopics(topics); + return warn().setMessage(message).setDatabaseResult(upsertResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param message The string to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder warn(String message, Database.UpsertResult upsertResult) { - return warn().setMessage(message).setDmlResult(upsertResult); + return warn().setMessage(message).setDatabaseResult(upsertResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param message The string to use to set the entry's message field + * @param apexException The instance of `Exception` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder warn(String message, Exception apexException, List topics) { return warn().setMessage(message).setExceptionDetails(apexException).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param message The string to use to set the entry's message field + * @param apexException The instance of `Exception` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder warn(String message, Exception apexException) { return warn().setMessage(message).setExceptionDetails(apexException); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param message The string to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @param apexException The instance of `Exception` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder warn(String message, Id recordId, Exception apexException, List topics) { return warn().setMessage(message).setRecordId(recordId).setExceptionDetails(apexException).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param message The string to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @param apexException The instance of `Exception` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder warn(String message, Id recordId, Exception apexException) { return warn().setMessage(message).setRecordId(recordId).setExceptionDetails(apexException); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param message The string to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder warn(String message, Id recordId, List topics) { return warn().setMessage(message).setRecordId(recordId).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param message The string to use to set the entry's message field + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder warn(String message, Id recordId) { return warn().setMessage(message).setRecordId(recordId); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param message The string to use to set the entry's message field + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder warn(String message, List topics) { return warn().setMessage(message).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param message The string to use to set the entry's message field + * @param record The `SObject` record to log + * @param apexException The instance of `Exception` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder warn(String message, SObject record, Exception apexException, List topics) { return warn().setMessage(message).setRecordId(record).setExceptionDetails(apexException).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param message The string to use to set the entry's message field + * @param record The `SObject` record to log + * @param apexException The instance of `Exception` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder warn(String message, SObject record, Exception apexException) { return warn().setMessage(message).setRecordId(record).setExceptionDetails(apexException); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param message The string to use to set the entry's message field + * @param record The `SObject` record to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder warn(String message, SObject record, List topics) { return warn().setMessage(message).setRecordId(record).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param message The string to use to set the entry's message field + * @param record The `SObject` record to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder warn(String message, SObject record) { return warn().setMessage(message).setRecordId(record); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.WARN` + * @param message The string to use to set the entry's message field + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder warn(String message) { return warn().setMessage(message); } // INFO logging level methods + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder info(LogMessage logMessage, Database.DeleteResult deleteResult, List topics) { - return info().setMessage(logMessage).setDmlResult(deleteResult).setTopics(topics); + return info().setMessage(logMessage).setDatabaseResult(deleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder info(LogMessage logMessage, Database.DeleteResult deleteResult) { - return info().setMessage(logMessage).setDmlResult(deleteResult); + return info().setMessage(logMessage).setDatabaseResult(deleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder info(LogMessage logMessage, Database.MergeResult mergeResult, List topics) { - return info().setMessage(logMessage).setDmlResult(mergeResult).setTopics(topics); + return info().setMessage(logMessage).setDatabaseResult(mergeResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder info(LogMessage logMessage, Database.MergeResult mergeResult) { - return info().setMessage(logMessage).setDmlResult(mergeResult); + return info().setMessage(logMessage).setDatabaseResult(mergeResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder info(LogMessage logMessage, Database.SaveResult saveResult, List topics) { - return info().setMessage(logMessage).setDmlResult(saveResult).setTopics(topics); + return info().setMessage(logMessage).setDatabaseResult(saveResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder info(LogMessage logMessage, Database.SaveResult saveResult) { - return info().setMessage(logMessage).setDmlResult(saveResult); + return info().setMessage(logMessage).setDatabaseResult(saveResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder info(LogMessage logMessage, Database.UndeleteResult undeleteResult, List topics) { - return info().setMessage(logMessage).setDmlResult(undeleteResult).setTopics(topics); + return info().setMessage(logMessage).setDatabaseResult(undeleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder info(LogMessage logMessage, Database.UndeleteResult undeleteResult) { - return info().setMessage(logMessage).setDmlResult(undeleteResult); + return info().setMessage(logMessage).setDatabaseResult(undeleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder info(LogMessage logMessage, Database.UpsertResult upsertResult, List topics) { - return info().setMessage(logMessage).setDmlResult(upsertResult).setTopics(topics); + return info().setMessage(logMessage).setDatabaseResult(upsertResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder info(LogMessage logMessage, Database.UpsertResult upsertResult) { - return info().setMessage(logMessage).setDmlResult(upsertResult); + return info().setMessage(logMessage).setDatabaseResult(upsertResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder info(LogMessage logMessage, Id recordId, List topics) { return info().setMessage(logMessage).setRecordId(recordId).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder info(LogMessage logMessage, Id recordId) { return info().setMessage(logMessage).setRecordId(recordId); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder info(LogMessage logMessage, List topics) { return info().setMessage(logMessage).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param record The `SObject` record to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder info(LogMessage logMessage, SObject record, List topics) { return info().setMessage(logMessage).setRecordId(record).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param record The `SObject` record to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder info(LogMessage logMessage, SObject record) { return info().setMessage(logMessage).setRecordId(record); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder info(LogMessage logMessage) { return info().setMessage(logMessage); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param message The string to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder info(String message, Database.DeleteResult deleteResult, List topics) { - return info().setMessage(message).setDmlResult(deleteResult).setTopics(topics); + return info().setMessage(message).setDatabaseResult(deleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param message The string to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder info(String message, Database.DeleteResult deleteResult) { - return info().setMessage(message).setDmlResult(deleteResult); + return info().setMessage(message).setDatabaseResult(deleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param message The string to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder info(String message, Database.MergeResult mergeResult, List topics) { - return info().setMessage(message).setDmlResult(mergeResult).setTopics(topics); + return info().setMessage(message).setDatabaseResult(mergeResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param message The string to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder info(String message, Database.MergeResult mergeResult) { - return info().setMessage(message).setDmlResult(mergeResult); + return info().setMessage(message).setDatabaseResult(mergeResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param message The string to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder info(String message, Database.SaveResult saveResult, List topics) { - return info().setMessage(message).setDmlResult(saveResult).setTopics(topics); + return info().setMessage(message).setDatabaseResult(saveResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param message The string to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder info(String message, Database.SaveResult saveResult) { - return info().setMessage(message).setDmlResult(saveResult); + return info().setMessage(message).setDatabaseResult(saveResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param message The string to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder info(String message, Database.UndeleteResult undeleteResult, List topics) { - return info().setMessage(message).setDmlResult(undeleteResult).setTopics(topics); + return info().setMessage(message).setDatabaseResult(undeleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param message The string to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder info(String message, Database.UndeleteResult undeleteResult) { - return info().setMessage(message).setDmlResult(undeleteResult); + return info().setMessage(message).setDatabaseResult(undeleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param message The string to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder info(String message, Database.UpsertResult upsertResult, List topics) { - return info().setMessage(message).setDmlResult(upsertResult).setTopics(topics); + return info().setMessage(message).setDatabaseResult(upsertResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param message The string to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder info(String message, Database.UpsertResult upsertResult) { - return info().setMessage(message).setDmlResult(upsertResult); + return info().setMessage(message).setDatabaseResult(upsertResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param message The string to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder info(String message, Id recordId, List topics) { return info().setMessage(message).setRecordId(recordId).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param message The string to use to set the entry's message field + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder info(String message, Id recordId) { return info().setMessage(message).setRecordId(recordId); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param message The string to use to set the entry's message field + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder info(String message, List topics) { return info().setMessage(message).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param message The string to use to set the entry's message field + * @param record The `SObject` record to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder info(String message, SObject record, List topics) { return info().setMessage(message).setRecordId(record).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param message The string to use to set the entry's message field + * @param record The `SObject` record to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder info(String message, SObject record) { return info().setMessage(message).setRecordId(record); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.INFO` + * @param message The string to use to set the entry's message field + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder info(String message) { return info().setMessage(message); } // DEBUG log level methods + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder debug(LogMessage logMessage, Database.DeleteResult deleteResult, List topics) { - return debug().setMessage(logMessage).setDmlResult(deleteResult).setTopics(topics); + return debug().setMessage(logMessage).setDatabaseResult(deleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder debug(LogMessage logMessage, Database.DeleteResult deleteResult) { - return debug().setMessage(logMessage).setDmlResult(deleteResult); + return debug().setMessage(logMessage).setDatabaseResult(deleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder debug(LogMessage logMessage, Database.MergeResult mergeResult, List topics) { - return debug().setMessage(logMessage).setDmlResult(mergeResult).setTopics(topics); + return debug().setMessage(logMessage).setDatabaseResult(mergeResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder debug(LogMessage logMessage, Database.MergeResult mergeResult) { - return debug().setMessage(logMessage).setDmlResult(mergeResult); + return debug().setMessage(logMessage).setDatabaseResult(mergeResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder debug(LogMessage logMessage, Database.SaveResult saveResult, List topics) { - return debug().setMessage(logMessage).setDmlResult(saveResult).setTopics(topics); + return debug().setMessage(logMessage).setDatabaseResult(saveResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder debug(LogMessage logMessage, Database.SaveResult saveResult) { - return debug().setMessage(logMessage).setDmlResult(saveResult); + return debug().setMessage(logMessage).setDatabaseResult(saveResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder debug(LogMessage logMessage, Database.UndeleteResult undeleteResult, List topics) { - return debug().setMessage(logMessage).setDmlResult(undeleteResult).setTopics(topics); + return debug().setMessage(logMessage).setDatabaseResult(undeleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder debug(LogMessage logMessage, Database.UndeleteResult undeleteResult) { - return debug().setMessage(logMessage).setDmlResult(undeleteResult); + return debug().setMessage(logMessage).setDatabaseResult(undeleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder debug(LogMessage logMessage, Database.UpsertResult upsertResult, List topics) { - return debug().setMessage(logMessage).setDmlResult(upsertResult).setTopics(topics); + return debug().setMessage(logMessage).setDatabaseResult(upsertResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder debug(LogMessage logMessage, Database.UpsertResult upsertResult) { - return debug().setMessage(logMessage).setDmlResult(upsertResult); + return debug().setMessage(logMessage).setDatabaseResult(upsertResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder debug(LogMessage logMessage, Id recordId, List topics) { return debug().setMessage(logMessage).setRecordId(recordId).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder debug(LogMessage logMessage, Id recordId) { return debug().setMessage(logMessage).setRecordId(recordId); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder debug(LogMessage logMessage, List topics) { return debug().setMessage(logMessage).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param record The `SObject` record to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder debug(LogMessage logMessage, SObject record, List topics) { return debug().setMessage(logMessage).setRecordId(record).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param record The `SObject` record to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder debug(LogMessage logMessage, SObject record) { return debug().setMessage(logMessage).setRecordId(record); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder debug(LogMessage logMessage) { return debug().setMessage(logMessage); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param message The string to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder debug(String message, Database.DeleteResult deleteResult, List topics) { - return debug().setMessage(message).setDmlResult(deleteResult).setTopics(topics); + return debug().setMessage(message).setDatabaseResult(deleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param message The string to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder debug(String message, Database.DeleteResult deleteResult) { - return debug().setMessage(message).setDmlResult(deleteResult); + return debug().setMessage(message).setDatabaseResult(deleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param message The string to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder debug(String message, Database.MergeResult mergeResult, List topics) { - return debug().setMessage(message).setDmlResult(mergeResult).setTopics(topics); + return debug().setMessage(message).setDatabaseResult(mergeResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param message The string to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder debug(String message, Database.MergeResult mergeResult) { - return debug().setMessage(message).setDmlResult(mergeResult); + return debug().setMessage(message).setDatabaseResult(mergeResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param message The string to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder debug(String message, Database.SaveResult saveResult, List topics) { - return debug().setMessage(message).setDmlResult(saveResult).setTopics(topics); + return debug().setMessage(message).setDatabaseResult(saveResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param message The string to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder debug(String message, Database.SaveResult saveResult) { - return debug().setMessage(message).setDmlResult(saveResult); + return debug().setMessage(message).setDatabaseResult(saveResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param message The string to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder debug(String message, Database.UndeleteResult undeleteResult, List topics) { - return debug().setMessage(message).setDmlResult(undeleteResult).setTopics(topics); + return debug().setMessage(message).setDatabaseResult(undeleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param message The string to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder debug(String message, Database.UndeleteResult undeleteResult) { - return debug().setMessage(message).setDmlResult(undeleteResult); + return debug().setMessage(message).setDatabaseResult(undeleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param message The string to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder debug(String message, Database.UpsertResult upsertResult, List topics) { - return debug().setMessage(message).setDmlResult(upsertResult).setTopics(topics); + return debug().setMessage(message).setDatabaseResult(upsertResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param message The string to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder debug(String message, Database.UpsertResult upsertResult) { - return debug().setMessage(message).setDmlResult(upsertResult); + return debug().setMessage(message).setDatabaseResult(upsertResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param message The string to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder debug(String message, Id recordId, List topics) { return debug().setMessage(message).setRecordId(recordId).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param message The string to use to set the entry's message field + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder debug(String message, Id recordId) { return debug().setMessage(message).setRecordId(recordId); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param message The string to use to set the entry's message field + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder debug(String message, List topics) { return debug().setMessage(message).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param message The string to use to set the entry's message field + * @param record The `SObject` record to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder debug(String message, SObject record, List topics) { return debug().setMessage(message).setRecordId(record).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param message The string to use to set the entry's message field + * @param record The `SObject` record to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder debug(String message, SObject record) { return debug().setMessage(message).setRecordId(record); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.DEBUG` + * @param message The string to use to set the entry's message field + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder debug(String message) { return debug().setMessage(message); } // FINE log level methods + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder fine(LogMessage logMessage, Database.DeleteResult deleteResult, List topics) { - return fine().setMessage(logMessage).setDmlResult(deleteResult).setTopics(topics); + return fine().setMessage(logMessage).setDatabaseResult(deleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder fine(LogMessage logMessage, Database.DeleteResult deleteResult) { - return fine().setMessage(logMessage).setDmlResult(deleteResult); + return fine().setMessage(logMessage).setDatabaseResult(deleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder fine(LogMessage logMessage, Database.MergeResult mergeResult, List topics) { - return fine().setMessage(logMessage).setDmlResult(mergeResult).setTopics(topics); + return fine().setMessage(logMessage).setDatabaseResult(mergeResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder fine(LogMessage logMessage, Database.MergeResult mergeResult) { - return fine().setMessage(logMessage).setDmlResult(mergeResult); + return fine().setMessage(logMessage).setDatabaseResult(mergeResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder fine(LogMessage logMessage, Database.SaveResult saveResult, List topics) { - return fine().setMessage(logMessage).setDmlResult(saveResult).setTopics(topics); + return fine().setMessage(logMessage).setDatabaseResult(saveResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder fine(LogMessage logMessage, Database.SaveResult saveResult) { - return fine().setMessage(logMessage).setDmlResult(saveResult); + return fine().setMessage(logMessage).setDatabaseResult(saveResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder fine(LogMessage logMessage, Database.UndeleteResult undeleteResult, List topics) { - return fine().setMessage(logMessage).setDmlResult(undeleteResult).setTopics(topics); + return fine().setMessage(logMessage).setDatabaseResult(undeleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder fine(LogMessage logMessage, Database.UndeleteResult undeleteResult) { - return fine().setMessage(logMessage).setDmlResult(undeleteResult); + return fine().setMessage(logMessage).setDatabaseResult(undeleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder fine(LogMessage logMessage, Database.UpsertResult upsertResult, List topics) { - return fine().setMessage(logMessage).setDmlResult(upsertResult).setTopics(topics); + return fine().setMessage(logMessage).setDatabaseResult(upsertResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder fine(LogMessage logMessage, Database.UpsertResult upsertResult) { - return fine().setMessage(logMessage).setDmlResult(upsertResult); + return fine().setMessage(logMessage).setDatabaseResult(upsertResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder fine(LogMessage logMessage, Id recordId, List topics) { return fine().setMessage(logMessage).setRecordId(recordId).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder fine(LogMessage logMessage, Id recordId) { return fine().setMessage(logMessage).setRecordId(recordId); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder fine(LogMessage logMessage, List topics) { return fine().setMessage(logMessage).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param record The `SObject` record to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder fine(LogMessage logMessage, SObject record, List topics) { return fine().setMessage(logMessage).setRecordId(record).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param record The `SObject` record to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder fine(LogMessage logMessage, SObject record) { return fine().setMessage(logMessage).setRecordId(record); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder fine(LogMessage logMessage) { return fine().setMessage(logMessage); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param message The string to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder fine(String message, Database.DeleteResult deleteResult, List topics) { - return fine().setMessage(message).setDmlResult(deleteResult).setTopics(topics); + return fine().setMessage(message).setDatabaseResult(deleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param message The string to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder fine(String message, Database.DeleteResult deleteResult) { - return fine().setMessage(message).setDmlResult(deleteResult); + return fine().setMessage(message).setDatabaseResult(deleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param message The string to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder fine(String message, Database.MergeResult mergeResult, List topics) { - return fine().setMessage(message).setDmlResult(mergeResult).setTopics(topics); + return fine().setMessage(message).setDatabaseResult(mergeResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param message The string to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder fine(String message, Database.MergeResult mergeResult) { - return fine().setMessage(message).setDmlResult(mergeResult); + return fine().setMessage(message).setDatabaseResult(mergeResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param message The string to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder fine(String message, Database.SaveResult saveResult, List topics) { - return fine().setMessage(message).setDmlResult(saveResult).setTopics(topics); + return fine().setMessage(message).setDatabaseResult(saveResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param message The string to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder fine(String message, Database.SaveResult saveResult) { - return fine().setMessage(message).setDmlResult(saveResult); + return fine().setMessage(message).setDatabaseResult(saveResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param message The string to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder fine(String message, Database.UndeleteResult undeleteResult, List topics) { - return fine().setMessage(message).setDmlResult(undeleteResult).setTopics(topics); + return fine().setMessage(message).setDatabaseResult(undeleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param message The string to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder fine(String message, Database.UndeleteResult undeleteResult) { - return fine().setMessage(message).setDmlResult(undeleteResult); + return fine().setMessage(message).setDatabaseResult(undeleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param message The string to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder fine(String message, Database.UpsertResult upsertResult, List topics) { - return fine().setMessage(message).setDmlResult(upsertResult).setTopics(topics); + return fine().setMessage(message).setDatabaseResult(upsertResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param message The string to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder fine(String message, Database.UpsertResult upsertResult) { - return fine().setMessage(message).setDmlResult(upsertResult); + return fine().setMessage(message).setDatabaseResult(upsertResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param message The string to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder fine(String message, Id recordId, List topics) { return fine().setMessage(message).setRecordId(recordId).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param message The string to use to set the entry's message field + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder fine(String message, Id recordId) { return fine().setMessage(message).setRecordId(recordId); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param message The string to use to set the entry's message field + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder fine(String message, List topics) { return fine().setMessage(message).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param message The string to use to set the entry's message field + * @param record The `SObject` record to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder fine(String message, SObject record, List topics) { return fine().setMessage(message).setRecordId(record).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param message The string to use to set the entry's message field + * @param record The `SObject` record to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder fine(String message, SObject record) { return fine().setMessage(message).setRecordId(record); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINE` + * @param message The string to use to set the entry's message field + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder fine(String message) { return fine().setMessage(message); } // FINER log level methods + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finer(LogMessage logMessage, Database.DeleteResult deleteResult, List topics) { - return finer().setMessage(logMessage).setDmlResult(deleteResult).setTopics(topics); + return finer().setMessage(logMessage).setDatabaseResult(deleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finer(LogMessage logMessage, Database.DeleteResult deleteResult) { - return finer().setMessage(logMessage).setDmlResult(deleteResult); + return finer().setMessage(logMessage).setDatabaseResult(deleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finer(LogMessage logMessage, Database.MergeResult mergeResult, List topics) { - return finer().setMessage(logMessage).setDmlResult(mergeResult).setTopics(topics); + return finer().setMessage(logMessage).setDatabaseResult(mergeResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finer(LogMessage logMessage, Database.MergeResult mergeResult) { - return finer().setMessage(logMessage).setDmlResult(mergeResult); + return finer().setMessage(logMessage).setDatabaseResult(mergeResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finer(LogMessage logMessage, Database.SaveResult saveResult, List topics) { - return finer().setMessage(logMessage).setDmlResult(saveResult).setTopics(topics); + return finer().setMessage(logMessage).setDatabaseResult(saveResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finer(LogMessage logMessage, Database.SaveResult saveResult) { - return finer().setMessage(logMessage).setDmlResult(saveResult); + return finer().setMessage(logMessage).setDatabaseResult(saveResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finer(LogMessage logMessage, Database.UndeleteResult undeleteResult, List topics) { - return finer().setMessage(logMessage).setDmlResult(undeleteResult).setTopics(topics); + return finer().setMessage(logMessage).setDatabaseResult(undeleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finer(LogMessage logMessage, Database.UndeleteResult undeleteResult) { - return finer().setMessage(logMessage).setDmlResult(undeleteResult); + return finer().setMessage(logMessage).setDatabaseResult(undeleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finer(LogMessage logMessage, Database.UpsertResult upsertResult, List topics) { - return finer().setMessage(logMessage).setDmlResult(upsertResult).setTopics(topics); + return finer().setMessage(logMessage).setDatabaseResult(upsertResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finer(LogMessage logMessage, Database.UpsertResult upsertResult) { - return finer().setMessage(logMessage).setDmlResult(upsertResult); + return finer().setMessage(logMessage).setDatabaseResult(upsertResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finer(LogMessage logMessage, Id recordId, List topics) { return finer().setMessage(logMessage).setRecordId(recordId).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finer(LogMessage logMessage, Id recordId) { return finer().setMessage(logMessage).setRecordId(recordId); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finer(LogMessage logMessage, List topics) { return finer().setMessage(logMessage).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param record The `SObject` record to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finer(LogMessage logMessage, SObject record, List topics) { return finer().setMessage(logMessage).setRecordId(record).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param record The `SObject` record to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finer(LogMessage logMessage, SObject record) { return finer().setMessage(logMessage).setRecordId(record); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finer(LogMessage logMessage) { return finer().setMessage(logMessage); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param message The string to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finer(String message, Database.DeleteResult deleteResult, List topics) { - return finer().setMessage(message).setDmlResult(deleteResult).setTopics(topics); + return finer().setMessage(message).setDatabaseResult(deleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param message The string to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finer(String message, Database.DeleteResult deleteResult) { - return finer().setMessage(message).setDmlResult(deleteResult); + return finer().setMessage(message).setDatabaseResult(deleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param message The string to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finer(String message, Database.MergeResult mergeResult, List topics) { - return finer().setMessage(message).setDmlResult(mergeResult).setTopics(topics); + return finer().setMessage(message).setDatabaseResult(mergeResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param message The string to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finer(String message, Database.MergeResult mergeResult) { - return finer().setMessage(message).setDmlResult(mergeResult); + return finer().setMessage(message).setDatabaseResult(mergeResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param message The string to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finer(String message, Database.SaveResult saveResult, List topics) { - return finer().setMessage(message).setDmlResult(saveResult).setTopics(topics); + return finer().setMessage(message).setDatabaseResult(saveResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param message The string to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finer(String message, Database.SaveResult saveResult) { - return finer().setMessage(message).setDmlResult(saveResult); + return finer().setMessage(message).setDatabaseResult(saveResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param message The string to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finer(String message, Database.UndeleteResult undeleteResult, List topics) { - return finer().setMessage(message).setDmlResult(undeleteResult).setTopics(topics); + return finer().setMessage(message).setDatabaseResult(undeleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param message The string to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finer(String message, Database.UndeleteResult undeleteResult) { - return finer().setMessage(message).setDmlResult(undeleteResult); + return finer().setMessage(message).setDatabaseResult(undeleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param message The string to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finer(String message, Database.UpsertResult upsertResult, List topics) { - return finer().setMessage(message).setDmlResult(upsertResult).setTopics(topics); + return finer().setMessage(message).setDatabaseResult(upsertResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param message The string to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finer(String message, Database.UpsertResult upsertResult) { - return finer().setMessage(message).setDmlResult(upsertResult); + return finer().setMessage(message).setDatabaseResult(upsertResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param message The string to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finer(String message, Id recordId, List topics) { return finer().setMessage(message).setRecordId(recordId).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param message The string to use to set the entry's message field + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finer(String message, Id recordId) { return finer().setMessage(message).setRecordId(recordId); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param message The string to use to set the entry's message field + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finer(String message, List topics) { return finer().setMessage(message).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param message The string to use to set the entry's message field + * @param record The `SObject` record to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finer(String message, SObject record, List topics) { return finer().setMessage(message).setRecordId(record).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param message The string to use to set the entry's message field + * @param record The `SObject` record to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finer(String message, SObject record) { return finer().setMessage(message).setRecordId(record); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINER` + * @param message The string to use to set the entry's message field + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finer(String message) { return finer().setMessage(message); } // FINEST log level methods + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finest(LogMessage logMessage, Database.DeleteResult deleteResult, List topics) { - return finest().setMessage(logMessage).setDmlResult(deleteResult).setTopics(topics); + return finest().setMessage(logMessage).setDatabaseResult(deleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finest(LogMessage logMessage, Database.DeleteResult deleteResult) { - return finest().setMessage(logMessage).setDmlResult(deleteResult); + return finest().setMessage(logMessage).setDatabaseResult(deleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finest(LogMessage logMessage, Database.MergeResult mergeResult, List topics) { - return finest().setMessage(logMessage).setDmlResult(mergeResult).setTopics(topics); + return finest().setMessage(logMessage).setDatabaseResult(mergeResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finest(LogMessage logMessage, Database.MergeResult mergeResult) { - return finest().setMessage(logMessage).setDmlResult(mergeResult); + return finest().setMessage(logMessage).setDatabaseResult(mergeResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finest(LogMessage logMessage, Database.SaveResult saveResult, List topics) { - return finest().setMessage(logMessage).setDmlResult(saveResult).setTopics(topics); + return finest().setMessage(logMessage).setDatabaseResult(saveResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finest(LogMessage logMessage, Database.SaveResult saveResult) { - return finest().setMessage(logMessage).setDmlResult(saveResult); + return finest().setMessage(logMessage).setDatabaseResult(saveResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finest(LogMessage logMessage, Database.UndeleteResult undeleteResult, List topics) { - return finest().setMessage(logMessage).setDmlResult(undeleteResult).setTopics(topics); + return finest().setMessage(logMessage).setDatabaseResult(undeleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finest(LogMessage logMessage, Database.UndeleteResult undeleteResult) { - return finest().setMessage(logMessage).setDmlResult(undeleteResult); + return finest().setMessage(logMessage).setDatabaseResult(undeleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finest(LogMessage logMessage, Database.UpsertResult upsertResult, List topics) { - return finest().setMessage(logMessage).setDmlResult(upsertResult).setTopics(topics); + return finest().setMessage(logMessage).setDatabaseResult(upsertResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finest(LogMessage logMessage, Database.UpsertResult upsertResult) { - return finest().setMessage(logMessage).setDmlResult(upsertResult); + return finest().setMessage(logMessage).setDatabaseResult(upsertResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finest(LogMessage logMessage, Id recordId, List topics) { return finest().setMessage(logMessage).setRecordId(recordId).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finest(LogMessage logMessage, Id recordId) { return finest().setMessage(logMessage).setRecordId(recordId); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finest(LogMessage logMessage, List topics) { return finest().setMessage(logMessage).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param record The `SObject` record to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finest(LogMessage logMessage, SObject record, List topics) { return finest().setMessage(logMessage).setRecordId(record).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @param record The `SObject` record to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finest(LogMessage logMessage, SObject record) { return finest().setMessage(logMessage).setRecordId(record); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param logMessage The instance of `LogMessage` to use to set the entry's message field + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finest(LogMessage logMessage) { return finest().setMessage(logMessage); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param message The string to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finest(String message, Database.DeleteResult deleteResult, List topics) { - return finest().setMessage(message).setDmlResult(deleteResult).setTopics(topics); + return finest().setMessage(message).setDatabaseResult(deleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param message The string to use to set the entry's message field + * @param deleteResult The instance of `Database.DeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finest(String message, Database.DeleteResult deleteResult) { - return finest().setMessage(message).setDmlResult(deleteResult); + return finest().setMessage(message).setDatabaseResult(deleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param message The string to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finest(String message, Database.MergeResult mergeResult, List topics) { - return finest().setMessage(message).setDmlResult(mergeResult).setTopics(topics); + return finest().setMessage(message).setDatabaseResult(mergeResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param message The string to use to set the entry's message field + * @param mergeResult The instance of `Database.MergeResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finest(String message, Database.MergeResult mergeResult) { - return finest().setMessage(message).setDmlResult(mergeResult); + return finest().setMessage(message).setDatabaseResult(mergeResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param message The string to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finest(String message, Database.SaveResult saveResult, List topics) { - return finest().setMessage(message).setDmlResult(saveResult).setTopics(topics); + return finest().setMessage(message).setDatabaseResult(saveResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param message The string to use to set the entry's message field + * @param saveResult The instance of `Database.SaveResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finest(String message, Database.SaveResult saveResult) { - return finest().setMessage(message).setDmlResult(saveResult); + return finest().setMessage(message).setDatabaseResult(saveResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param message The string to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finest(String message, Database.UndeleteResult undeleteResult, List topics) { - return finest().setMessage(message).setDmlResult(undeleteResult).setTopics(topics); + return finest().setMessage(message).setDatabaseResult(undeleteResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param message The string to use to set the entry's message field + * @param undeleteResult The instance of `Database.UndeleteResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finest(String message, Database.UndeleteResult undeleteResult) { - return finest().setMessage(message).setDmlResult(undeleteResult); + return finest().setMessage(message).setDatabaseResult(undeleteResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param message The string to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finest(String message, Database.UpsertResult upsertResult, List topics) { - return finest().setMessage(message).setDmlResult(upsertResult).setTopics(topics); + return finest().setMessage(message).setDatabaseResult(upsertResult).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param message The string to use to set the entry's message field + * @param upsertResult The instance of `Database.UpsertResult` to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finest(String message, Database.UpsertResult upsertResult) { - return finest().setMessage(message).setDmlResult(upsertResult); + return finest().setMessage(message).setDatabaseResult(upsertResult); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param message The string to use to set the entry's message field + * @param recordId The record ID of an `SObject` to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finest(String message, Id recordId, List topics) { return finest().setMessage(message).setRecordId(recordId).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param message The string to use to set the entry's message field + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finest(String message, Id recordId) { return finest().setMessage(message).setRecordId(recordId); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param message The string to use to set the entry's message field + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finest(String message, List topics) { return finest().setMessage(message).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param message The string to use to set the entry's message field + * @param record The `SObject` record to log + * @param topics The instance of `List` to use as topics for the current entry + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ public static LogEntryEventBuilder finest(String message, SObject record, List topics) { return finest().setMessage(message).setRecordId(record).setTopics(topics); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param message The string to use to set the entry's message field + * @param record The `SObject` record to log + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finest(String message, SObject record) { return finest().setMessage(message).setRecordId(record); } + /** + * @description Creates a new log entry with logging level == `LoggingLevel.FINEST` + * @param message The string to use to set the entry's message field + * @return The new entry's instance of `LogEntryEventBuilder`, useful for chaining methods + */ global static LogEntryEventBuilder finest(String message) { return finest().setMessage(message); } /** - * Adds a new instance of LogEntryEventBuilder to Logger's buffer, if shouldSave == true - * @param loggingLevel The logging level enum for the new entry + * @description Adds a new instance of LogEntryEventBuilder to Logger's buffer, if shouldSave == true + * @param loggingLevel The logging level enum value for the new entry * @param logMessage The instance of LogMessage to use as the entry's message * @param shouldSave Controls if the new entry will be saved. This can be used to save entries, even if the entry's logging level does not meet the user's logging level * @return The new entry's instance of LogEntryEventBuilder @@ -1216,8 +2816,8 @@ global with sharing class Logger { } /** - * Adds a new instance of LogEntryEventBuilder to Logger's buffer, if it meets the user's logging level - * @param loggingLevel The logging level enum for the new entry + * @description Adds a new instance of LogEntryEventBuilder to Logger's buffer, if it meets the user's logging level + * @param loggingLevel The logging level enum value for the new entry * @param logMessage The instance of LogMessage to use as the entry's message * @return The new entry's instance of LogEntryEventBuilder */ @@ -1226,8 +2826,8 @@ global with sharing class Logger { } /** - * Adds a new instance of LogEntryEventBuilder to Logger's buffer, if it meets the user's logging level - * @param loggingLevel The logging level enum for the new entry + * @description Adds a new instance of LogEntryEventBuilder to Logger's buffer, if it meets the user's logging level + * @param loggingLevel The logging level enum value for the new entry * @param message The string to use as the entry's message * @param shouldSave Controls if the new entry will be saved. This can be used to save entries, even if the entry's logging level does not meet the user's logging level * @return The new entry's instance of LogEntryEventBuilder @@ -1237,8 +2837,8 @@ global with sharing class Logger { } /** - * Adds a new instance of LogEntryEventBuilder to Logger's buffer, if it meets the user's logging level - * @param loggingLevel The logging level enum for the new entry + * @description Adds a new instance of LogEntryEventBuilder to Logger's buffer, if it meets the user's logging level + * @param loggingLevel The logging level enum value for the new entry * @param message The string to use as the entry's message * @return The new entry's instance of LogEntryEventBuilder */ @@ -1249,7 +2849,7 @@ global with sharing class Logger { // Save control methods /** - * Sets the default save method used when calling saveLog() - any subsequent calls to saveLog() will use the specified save method + * @description Sets the default save method used when calling saveLog() - any subsequent calls to saveLog() will use the specified save method * @param saveMethod - The enum value of Logger.SaveMethod to use for any other calls to saveLog() in the current transaction */ global static void setSaveMethod(SaveMethod saveMethod) { @@ -1257,7 +2857,7 @@ global with sharing class Logger { } /** - * Saves any entries in Logger's buffer. By default, entries are saved via Apex's EventBus and can be overridden with setSaveMethod(SaveMethod saveMethod) + * @description Saves any entries in Logger's buffer. By default, entries are saved via Apex's EventBus and can be overridden with setSaveMethod(SaveMethod saveMethod) */ @InvocableMethod(category='Logging' label='Save Log' description='Saves any log entries that have been generated') global static void saveLog() { @@ -1265,8 +2865,8 @@ global with sharing class Logger { } /** - * Saves any entries in Logger's buffer, using the specified save method for only this call. - * All subsequent calls to saveLog() will use the transaction save method. + * @description Saves any entries in Logger's buffer, using the specified save method for only this call. + * All subsequent calls to saveLog() will use the transaction save method. * @param saveMethod The enum value of Logger.SaveMethod to use for this specific save action. */ global static void saveLog(SaveMethod saveMethod) { @@ -1329,13 +2929,13 @@ global with sharing class Logger { // Utility methods /** - * Converts a String to an instance of LoggingLevel - * @param String loggingLevelName - The string name of an Apex logging level - * @return LoggingLevel - The matching instance of LoggingLevel (or a default value if a match is not found) + * @description Converts a String to an instance of LoggingLevel + * @param loggingLevelName The string name of an Apex logging level + * @return The matching instance of LoggingLevel (or a default value if a match is not found) */ global static LoggingLevel getLoggingLevel(String loggingLevelName) { if (loggingLevelName != null) { - loggingLevelName = loggingLevelName.toUpperCase(); + loggingLevelName = loggingLevelName.trim().toUpperCase(); } switch on loggingLevelName { @@ -1377,9 +2977,9 @@ global with sharing class Logger { // TODO consider removing this method after converting aura cmp to lwc (and presumably create a dedicated Apex ctrl w/ this method) // But the safe choice is to just keep it now/forever /** - * Returns a Log__c record from the database - * @param logId - The Salesforce ID or TransactionId__c of the Log__c - * @return Log__c - The matching record, with all fields that the current user can access + * @description Returns a Log__c record from the database, using either the Salesforce ID or transaction ID + * @param logId The Salesforce ID or TransactionId__c of the Log__c + * @return The matching record, with all fields that the current user can access */ @AuraEnabled(cacheable=true) public static Log__c getLog(String logId) { @@ -1512,7 +3112,7 @@ global with sharing class Logger { Boolean allOrNone = true; RestSaveRequest saveRequest = new RestSaveRequest(records, allOrNone); - request.setBody(Json.serialize(saveRequest)); + request.setBody(JSON.serialize(saveRequest)); HttpResponse response = new Http().send(request); this.validateResponse(response); diff --git a/nebula-logger/main/logger-engine/objects/LogEntryEvent__e/fields/DmlResultErrors__c.field-meta.xml b/nebula-logger/main/logger-engine/objects/LogEntryEvent__e/fields/DatabaseResultJson__c.field-meta.xml similarity index 81% rename from nebula-logger/main/logger-engine/objects/LogEntryEvent__e/fields/DmlResultErrors__c.field-meta.xml rename to nebula-logger/main/logger-engine/objects/LogEntryEvent__e/fields/DatabaseResultJson__c.field-meta.xml index c265e0a7a..15c6cb72f 100644 --- a/nebula-logger/main/logger-engine/objects/LogEntryEvent__e/fields/DmlResultErrors__c.field-meta.xml +++ b/nebula-logger/main/logger-engine/objects/LogEntryEvent__e/fields/DatabaseResultJson__c.field-meta.xml @@ -1,11 +1,11 @@ - DmlResultErrors__c + DatabaseResultJson__c false false false false - + 131072 LongTextArea 8 diff --git a/nebula-logger/main/logger-engine/objects/LogEntryEvent__e/fields/DmlResultType__c.field-meta.xml b/nebula-logger/main/logger-engine/objects/LogEntryEvent__e/fields/DatabaseResultType__c.field-meta.xml similarity index 81% rename from nebula-logger/main/logger-engine/objects/LogEntryEvent__e/fields/DmlResultType__c.field-meta.xml rename to nebula-logger/main/logger-engine/objects/LogEntryEvent__e/fields/DatabaseResultType__c.field-meta.xml index a4dd69b96..4bbbe9a71 100644 --- a/nebula-logger/main/logger-engine/objects/LogEntryEvent__e/fields/DmlResultType__c.field-meta.xml +++ b/nebula-logger/main/logger-engine/objects/LogEntryEvent__e/fields/DatabaseResultType__c.field-meta.xml @@ -1,11 +1,11 @@ - DmlResultType__c + DatabaseResultType__c false false false false - + 255 false Text diff --git a/nebula-logger/main/packaging/classes/LoggerInstallHandler.cls b/nebula-logger/main/packaging/classes/LoggerInstallHandler.cls index 4fba2ca30..de1d1b658 100644 --- a/nebula-logger/main/packaging/classes/LoggerInstallHandler.cls +++ b/nebula-logger/main/packaging/classes/LoggerInstallHandler.cls @@ -9,8 +9,8 @@ */ global without sharing class LoggerInstallHandler implements InstallHandler { /** - * Automatically enables org default settings when installing the managed package - * @param installContext Context automatically provided by Salesforce when installing or upgrading + * @description Automatically enables org default settings when installing the managed package + * @param installContext Context automatically provided by Salesforce when installing or upgrading the managed package */ global void onInstall(System.InstallContext installContext) { LoggerSettings__c orgDefaults = LoggerSettings__c.getOrgDefaults(); diff --git a/nebula-logger/tests/log-management/classes/LogEntryEventHandler_Tests.cls b/nebula-logger/tests/log-management/classes/LogEntryEventHandler_Tests.cls index 26d051e35..ae70d61b1 100644 --- a/nebula-logger/tests/log-management/classes/LogEntryEventHandler_Tests.cls +++ b/nebula-logger/tests/log-management/classes/LogEntryEventHandler_Tests.cls @@ -302,7 +302,7 @@ private class LogEntryEventHandler_Tests { OriginType__c = 'Apex', ProfileId__c = currentUser.ProfileId, RecordId__c = currentUser.Id, - RecordJson__c = Json.serializePretty(currentUser), + RecordJson__c = JSON.serializePretty(currentUser), RecordSObjectClassification__c = 'Standard Object', RecordSObjectType__c = 'User', SessionId__c = null, diff --git a/nebula-logger/tests/logger-engine/classes/FlowRecordLogEntry_Tests.cls b/nebula-logger/tests/logger-engine/classes/FlowRecordLogEntry_Tests.cls index e73f78ad5..38ce2c377 100644 --- a/nebula-logger/tests/logger-engine/classes/FlowRecordLogEntry_Tests.cls +++ b/nebula-logger/tests/logger-engine/classes/FlowRecordLogEntry_Tests.cls @@ -42,7 +42,7 @@ private class FlowRecordLogEntry_Tests { Test.stopTest(); - String expectedUserJson = Json.serializePretty(currentUser); + String expectedUserJson = JSON.serializePretty(currentUser); LogEntry__c logEntry = [SELECT Id, RecordId__c, RecordJson__c FROM LogEntry__c ORDER BY CreatedDate LIMIT 1]; System.assertEquals(currentUser.Id, logEntry.RecordId__c); diff --git a/nebula-logger/tests/logger-engine/classes/LogEntryEventBuilder_Tests.cls b/nebula-logger/tests/logger-engine/classes/LogEntryEventBuilder_Tests.cls index 6d2959320..78786a9cb 100644 --- a/nebula-logger/tests/logger-engine/classes/LogEntryEventBuilder_Tests.cls +++ b/nebula-logger/tests/logger-engine/classes/LogEntryEventBuilder_Tests.cls @@ -163,13 +163,13 @@ private class LogEntryEventBuilder_Tests { LogEntryEventBuilder builder = new LogEntryEventBuilder(LoggingLevel.INFO, true); Test.startTest(); - builder.setDmlResult(deleteResult); + builder.setDatabaseResult(deleteResult); Test.stopTest(); LogEntryEvent__e logEntryEvent = builder.getLogEntryEvent(); - System.assertEquals(null, logEntryEvent.DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), logEntryEvent.DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), logEntryEvent.DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), logEntryEvent.DatabaseResultType__c); } @isTest @@ -186,13 +186,13 @@ private class LogEntryEventBuilder_Tests { LogEntryEventBuilder builder = new LogEntryEventBuilder(LoggingLevel.INFO, true); Test.startTest(); - builder.setDmlResult(deleteResult); + builder.setDatabaseResult(deleteResult); Test.stopTest(); LogEntryEvent__e logEntryEvent = builder.getLogEntryEvent(); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), logEntryEvent.DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), logEntryEvent.DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), logEntryEvent.DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), logEntryEvent.DatabaseResultType__c); } // TODO only some standard objects can be merged - need to find a way to either mock or trigger a merge result that works in all orgs @@ -204,13 +204,13 @@ private class LogEntryEventBuilder_Tests { // LogEntryEventBuilder builder = new LogEntryEventBuilder(LoggingLevel.INFO, true); // Test.startTest(); - // builder.setDmlResult(mergeResult); + // builder.setDatabaseResult(mergeResult); // Test.stopTest(); // LogEntryEvent__e logEntryEvent = builder.getLogEntryEvent(); - // System.assertEquals(Json.serializePretty(mergeResult.getErrors()), logEntryEvent.DmlResultErrors__c); - // System.assertEquals(Database.MergeResult.class.getName(), logEntryEvent.DmlResultType__c); + // System.assertEquals(JSON.serializePretty(mergeResult), logEntryEvent.DatabaseResultJson__c); + // System.assertEquals(Database.MergeResult.class.getName(), logEntryEvent.DatabaseResultType__c); // } @isTest @@ -221,13 +221,13 @@ private class LogEntryEventBuilder_Tests { LogEntryEventBuilder builder = new LogEntryEventBuilder(LoggingLevel.INFO, true); Test.startTest(); - builder.setDmlResult(saveResult); + builder.setDatabaseResult(saveResult); Test.stopTest(); LogEntryEvent__e logEntryEvent = builder.getLogEntryEvent(); - System.assertEquals(null, logEntryEvent.DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), logEntryEvent.DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), logEntryEvent.DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), logEntryEvent.DatabaseResultType__c); } @isTest @@ -238,16 +238,15 @@ private class LogEntryEventBuilder_Tests { LogEntryEventBuilder builder = new LogEntryEventBuilder(LoggingLevel.INFO, true); Test.startTest(); - builder.setDmlResult(saveResult); + builder.setDatabaseResult(saveResult); Test.stopTest(); LogEntryEvent__e logEntryEvent = builder.getLogEntryEvent(); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), logEntryEvent.DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), logEntryEvent.DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), logEntryEvent.DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), logEntryEvent.DatabaseResultType__c); } - @isTest static void it_should_set_dml_result_fields_for_successful_undeleteResult() { Log__c log = new Log__c(TransactionId__c = '1234'); @@ -260,13 +259,13 @@ private class LogEntryEventBuilder_Tests { LogEntryEventBuilder builder = new LogEntryEventBuilder(LoggingLevel.INFO, true); Test.startTest(); - builder.setDmlResult(undeleteResult); + builder.setDatabaseResult(undeleteResult); Test.stopTest(); LogEntryEvent__e logEntryEvent = builder.getLogEntryEvent(); - System.assertEquals(null, logEntryEvent.DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), logEntryEvent.DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), logEntryEvent.DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), logEntryEvent.DatabaseResultType__c); } @isTest @@ -283,16 +282,15 @@ private class LogEntryEventBuilder_Tests { LogEntryEventBuilder builder = new LogEntryEventBuilder(LoggingLevel.INFO, true); Test.startTest(); - builder.setDmlResult(undeleteResult); + builder.setDatabaseResult(undeleteResult); Test.stopTest(); LogEntryEvent__e logEntryEvent = builder.getLogEntryEvent(); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), logEntryEvent.DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), logEntryEvent.DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), logEntryEvent.DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), logEntryEvent.DatabaseResultType__c); } - @isTest static void it_should_set_dml_result_fields_for_successful_upsertResult_when_insert() { // UpsertResult for a new record insert @@ -302,13 +300,13 @@ private class LogEntryEventBuilder_Tests { LogEntryEventBuilder builder = new LogEntryEventBuilder(LoggingLevel.INFO, true); Test.startTest(); - builder.setDmlResult(upsertResult); + builder.setDatabaseResult(upsertResult); Test.stopTest(); LogEntryEvent__e logEntryEvent = builder.getLogEntryEvent(); - System.assertEquals(null, logEntryEvent.DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', logEntryEvent.DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), logEntryEvent.DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', logEntryEvent.DatabaseResultType__c); } @isTest @@ -320,13 +318,13 @@ private class LogEntryEventBuilder_Tests { LogEntryEventBuilder builder = new LogEntryEventBuilder(LoggingLevel.INFO, true); Test.startTest(); - builder.setDmlResult(upsertResult); + builder.setDatabaseResult(upsertResult); Test.stopTest(); LogEntryEvent__e logEntryEvent = builder.getLogEntryEvent(); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), logEntryEvent.DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', logEntryEvent.DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), logEntryEvent.DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', logEntryEvent.DatabaseResultType__c); } @isTest @@ -342,13 +340,13 @@ private class LogEntryEventBuilder_Tests { LogEntryEventBuilder builder = new LogEntryEventBuilder(LoggingLevel.INFO, true); Test.startTest(); - builder.setDmlResult(upsertResult); + builder.setDatabaseResult(upsertResult); Test.stopTest(); LogEntryEvent__e logEntryEvent = builder.getLogEntryEvent(); - System.assertEquals(null, logEntryEvent.DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', logEntryEvent.DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), logEntryEvent.DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', logEntryEvent.DatabaseResultType__c); } @isTest @@ -371,13 +369,13 @@ private class LogEntryEventBuilder_Tests { LogEntryEventBuilder builder = new LogEntryEventBuilder(LoggingLevel.INFO, true); Test.startTest(); - builder.setDmlResult(upsertResult); + builder.setDatabaseResult(upsertResult); Test.stopTest(); LogEntryEvent__e logEntryEvent = builder.getLogEntryEvent(); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), logEntryEvent.DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', logEntryEvent.DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), logEntryEvent.DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', logEntryEvent.DatabaseResultType__c); } @isTest @@ -465,7 +463,7 @@ private class LogEntryEventBuilder_Tests { Test.stopTest(); System.assertEquals(currentUser.Id, builder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(currentUser), builder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(currentUser), builder.getLogEntryEvent().RecordJson__c); System.assertEquals('Standard Object', builder.getLogEntryEvent().RecordSObjectClassification__c); System.assertEquals('User', builder.getLogEntryEvent().RecordSObjectType__c); System.assertEquals(null, builder.getLogEntryEvent().RecordSObjectTypeNamespace__c); @@ -489,7 +487,7 @@ private class LogEntryEventBuilder_Tests { Test.stopTest(); System.assertEquals(log.Id, builder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(log), builder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(log), builder.getLogEntryEvent().RecordJson__c); System.assertEquals('Custom Object', builder.getLogEntryEvent().RecordSObjectClassification__c); System.assertEquals(Log__c.SObjectType.getDescribe().getName(), builder.getLogEntryEvent().RecordSObjectType__c); } @@ -511,7 +509,7 @@ private class LogEntryEventBuilder_Tests { Test.stopTest(); System.assertEquals(status.Id, builder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(status), builder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(status), builder.getLogEntryEvent().RecordJson__c); System.assertEquals('Custom Metadata Type Object', builder.getLogEntryEvent().RecordSObjectClassification__c); System.assertEquals(LogStatus__mdt.SObjectType.getDescribe().getName(), builder.getLogEntryEvent().RecordSObjectType__c); } diff --git a/nebula-logger/tests/logger-engine/classes/Logger_Tests.cls b/nebula-logger/tests/logger-engine/classes/Logger_Tests.cls index dd7723db8..a770de6b4 100644 --- a/nebula-logger/tests/logger-engine/classes/Logger_Tests.cls +++ b/nebula-logger/tests/logger-engine/classes/Logger_Tests.cls @@ -597,8 +597,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -621,8 +621,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -645,8 +645,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -669,8 +669,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -693,8 +693,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -717,8 +717,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -741,8 +741,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -765,8 +765,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -789,8 +789,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -813,8 +813,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -837,8 +837,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -861,8 +861,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -885,8 +885,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -909,8 +909,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -933,8 +933,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -957,8 +957,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -981,8 +981,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -1005,8 +1005,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -1029,8 +1029,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -1053,8 +1053,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -1224,7 +1224,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(getException().getMessage(), entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(getException().getTypeName(), entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); @@ -1246,7 +1246,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(getException().getMessage(), entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(getException().getTypeName(), entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); @@ -1268,7 +1268,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); @@ -1290,7 +1290,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); @@ -1339,8 +1339,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -1363,8 +1363,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -1387,8 +1387,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -1411,8 +1411,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -1435,8 +1435,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -1459,8 +1459,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -1483,8 +1483,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -1507,8 +1507,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -1531,8 +1531,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -1555,8 +1555,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -1579,8 +1579,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -1603,8 +1603,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -1627,8 +1627,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -1651,8 +1651,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -1675,8 +1675,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -1699,8 +1699,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -1723,8 +1723,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -1747,8 +1747,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -1771,8 +1771,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -1795,8 +1795,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -1966,7 +1966,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(getException().getMessage(), entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(getException().getTypeName(), entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); @@ -1988,7 +1988,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(getException().getMessage(), entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(getException().getTypeName(), entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); @@ -2010,7 +2010,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); @@ -2032,7 +2032,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); @@ -2080,8 +2080,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -2104,8 +2104,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -2128,8 +2128,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -2152,8 +2152,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -2176,8 +2176,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -2200,8 +2200,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -2224,8 +2224,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -2248,8 +2248,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -2272,8 +2272,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -2296,8 +2296,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -2320,8 +2320,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -2344,8 +2344,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -2368,8 +2368,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -2392,8 +2392,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -2416,8 +2416,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -2440,8 +2440,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -2464,8 +2464,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -2488,8 +2488,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -2512,8 +2512,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -2536,8 +2536,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -2707,7 +2707,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(getException().getMessage(), entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(getException().getTypeName(), entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); @@ -2729,7 +2729,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(getException().getMessage(), entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(getException().getTypeName(), entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); @@ -2751,7 +2751,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); @@ -2773,7 +2773,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); @@ -2822,8 +2822,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -2846,8 +2846,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -2870,8 +2870,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -2894,8 +2894,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -2918,8 +2918,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -2942,8 +2942,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -2966,8 +2966,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -2990,8 +2990,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -3014,8 +3014,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -3038,8 +3038,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -3062,8 +3062,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -3086,8 +3086,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -3110,8 +3110,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -3134,8 +3134,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -3158,8 +3158,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -3182,8 +3182,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -3206,8 +3206,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -3230,8 +3230,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -3254,8 +3254,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -3278,8 +3278,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -3449,7 +3449,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(getException().getMessage(), entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(getException().getTypeName(), entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); @@ -3471,7 +3471,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(getException().getMessage(), entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(getException().getTypeName(), entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); @@ -3493,7 +3493,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); @@ -3515,7 +3515,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); @@ -3564,8 +3564,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -3588,8 +3588,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -3612,8 +3612,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -3636,8 +3636,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -3660,8 +3660,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -3684,8 +3684,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -3708,8 +3708,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -3732,8 +3732,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -3756,8 +3756,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -3780,8 +3780,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -3804,8 +3804,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -3828,8 +3828,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -3852,8 +3852,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -3876,8 +3876,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -3900,8 +3900,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -3924,8 +3924,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -3948,8 +3948,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -3972,8 +3972,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -3996,8 +3996,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -4020,8 +4020,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -4103,7 +4103,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); @@ -4125,7 +4125,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); @@ -4174,8 +4174,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -4198,8 +4198,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -4222,8 +4222,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -4246,8 +4246,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -4270,8 +4270,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -4294,8 +4294,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -4318,8 +4318,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -4342,8 +4342,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -4366,8 +4366,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -4390,8 +4390,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -4414,8 +4414,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -4438,8 +4438,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -4462,8 +4462,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -4486,8 +4486,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -4510,8 +4510,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -4534,8 +4534,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -4558,8 +4558,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -4582,8 +4582,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -4606,8 +4606,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -4630,8 +4630,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -4713,7 +4713,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); @@ -4735,7 +4735,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); @@ -4784,8 +4784,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -4808,8 +4808,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -4832,8 +4832,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -4856,8 +4856,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -4880,8 +4880,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -4904,8 +4904,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -4928,8 +4928,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -4952,8 +4952,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -4976,8 +4976,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -5000,8 +5000,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -5024,8 +5024,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -5048,8 +5048,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -5072,8 +5072,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -5096,8 +5096,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -5120,8 +5120,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -5144,8 +5144,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -5168,8 +5168,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -5192,8 +5192,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -5216,8 +5216,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -5240,8 +5240,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -5323,7 +5323,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); @@ -5345,7 +5345,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); @@ -5394,8 +5394,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -5418,8 +5418,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -5442,8 +5442,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -5466,8 +5466,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -5490,8 +5490,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -5514,8 +5514,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -5538,8 +5538,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -5562,8 +5562,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -5586,8 +5586,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -5610,8 +5610,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -5634,8 +5634,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -5658,8 +5658,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -5682,8 +5682,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -5706,8 +5706,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -5730,8 +5730,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -5754,8 +5754,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -5778,8 +5778,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -5802,8 +5802,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -5826,8 +5826,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -5850,8 +5850,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -5933,7 +5933,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); @@ -5955,7 +5955,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); @@ -6004,8 +6004,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -6028,8 +6028,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -6052,8 +6052,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -6076,8 +6076,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -6100,8 +6100,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -6124,8 +6124,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -6148,8 +6148,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -6172,8 +6172,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -6196,8 +6196,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -6220,8 +6220,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -6244,8 +6244,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -6268,8 +6268,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -6292,8 +6292,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -6316,8 +6316,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -6340,8 +6340,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -6364,8 +6364,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -6388,8 +6388,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -6412,8 +6412,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -6436,8 +6436,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -6460,8 +6460,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -6543,7 +6543,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); @@ -6565,7 +6565,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); @@ -6614,8 +6614,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -6638,8 +6638,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -6662,8 +6662,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -6686,8 +6686,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -6710,8 +6710,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -6734,8 +6734,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -6758,8 +6758,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -6782,8 +6782,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -6806,8 +6806,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -6830,8 +6830,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -6854,8 +6854,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -6878,8 +6878,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -6902,8 +6902,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -6926,8 +6926,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -6950,8 +6950,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -6974,8 +6974,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -6998,8 +6998,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -7022,8 +7022,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -7046,8 +7046,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -7070,8 +7070,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -7153,7 +7153,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); @@ -7175,7 +7175,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); @@ -7224,8 +7224,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -7248,8 +7248,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -7272,8 +7272,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -7296,8 +7296,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -7320,8 +7320,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -7344,8 +7344,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -7368,8 +7368,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -7392,8 +7392,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -7416,8 +7416,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -7440,8 +7440,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -7464,8 +7464,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -7488,8 +7488,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -7512,8 +7512,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -7536,8 +7536,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -7560,8 +7560,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -7584,8 +7584,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -7608,8 +7608,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -7632,8 +7632,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -7656,8 +7656,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -7680,8 +7680,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -7763,7 +7763,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); @@ -7785,7 +7785,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); @@ -7834,8 +7834,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -7858,8 +7858,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -7882,8 +7882,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -7906,8 +7906,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -7930,8 +7930,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -7954,8 +7954,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -7978,8 +7978,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -8002,8 +8002,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -8026,8 +8026,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -8050,8 +8050,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -8074,8 +8074,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -8098,8 +8098,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -8122,8 +8122,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -8146,8 +8146,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -8170,8 +8170,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -8194,8 +8194,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -8218,8 +8218,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -8242,8 +8242,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -8266,8 +8266,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -8290,8 +8290,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -8373,7 +8373,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); @@ -8395,7 +8395,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); @@ -8444,8 +8444,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -8468,8 +8468,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -8492,8 +8492,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -8516,8 +8516,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -8540,8 +8540,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -8564,8 +8564,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -8588,8 +8588,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -8612,8 +8612,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -8636,8 +8636,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -8660,8 +8660,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -8684,8 +8684,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -8708,8 +8708,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -8732,8 +8732,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -8756,8 +8756,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -8780,8 +8780,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -8804,8 +8804,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -8828,8 +8828,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -8852,8 +8852,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -8876,8 +8876,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -8900,8 +8900,8 @@ private class Logger_Tests { System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -8983,7 +8983,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); @@ -9005,7 +9005,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getLogMessage().getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); @@ -9054,8 +9054,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -9078,8 +9078,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -9102,8 +9102,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -9126,8 +9126,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(deleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(deleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(deleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.DeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -9150,8 +9150,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -9174,8 +9174,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -9198,8 +9198,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -9222,8 +9222,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(saveResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(saveResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(saveResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.SaveResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -9246,8 +9246,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -9270,8 +9270,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -9294,8 +9294,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -9318,8 +9318,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(undeleteResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(undeleteResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(undeleteResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UndeleteResult.class.getName(), entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -9342,8 +9342,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -9366,8 +9366,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -9390,8 +9390,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -9414,8 +9414,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); } @@ -9438,8 +9438,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -9462,8 +9462,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Insert', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -9486,8 +9486,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(null, entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -9510,8 +9510,8 @@ private class Logger_Tests { System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(upsertResult.getId(), entryBuilder.getLogEntryEvent().RecordId__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().RecordJson__c); - System.assertEquals(Json.serializePretty(upsertResult.getErrors()), entryBuilder.getLogEntryEvent().DmlResultErrors__c); - System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DmlResultType__c); + System.assertEquals(JSON.serializePretty(upsertResult), entryBuilder.getLogEntryEvent().DatabaseResultJson__c); + System.assertEquals(Database.UpsertResult.class.getName() + '.Update', entryBuilder.getLogEntryEvent().DatabaseResultType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); } @@ -9593,7 +9593,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(String.join(getTopics(), ','), entryBuilder.getLogEntryEvent().Topics__c); @@ -9615,7 +9615,7 @@ private class Logger_Tests { System.assertEquals(loggingLevel.name(), entryBuilder.getLogEntryEvent().LoggingLevel__c); System.assertEquals(getMessage(), entryBuilder.getLogEntryEvent().Message__c); System.assertEquals(getRecord().Id, entryBuilder.getLogEntryEvent().RecordId__c); - System.assertEquals(Json.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); + System.assertEquals(JSON.serializePretty(getRecord()), entryBuilder.getLogEntryEvent().RecordJson__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionMessage__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().ExceptionType__c); System.assertEquals(null, entryBuilder.getLogEntryEvent().Topics__c); diff --git a/sfdx-project.json b/sfdx-project.json index 9a4f765de..f5b1199a9 100644 --- a/sfdx-project.json +++ b/sfdx-project.json @@ -9,14 +9,16 @@ "default": true, "definitionFile": "config/logger-scratch-def.json", "postInstallScript": "LoggerInstallHandler", - "versionName": "Managed Package Release", - "versionNumber": "4.0.0.NEXT", - "versionDescription": "Initial release of the new 2GP managed package", + "versionName": "New Apex methods & fields", + "versionNumber": "4.2.0.0", + "ancestorVersion": "4.0.0.9", + "versionDescription": "New Apex methods for additional loggings options + additional fields on Log and Log Entry", "releaseNotesUrl": "https://github.com/jongpie/NebulaLogger/releases" } ], "packageAliases": { "Nebula Logger": "0Ho5Y000000XZCDSA4", - "Nebula Logger@4.0.0-9-managed-package-release": "04t5Y000000XJZ7QAO" + "Nebula Logger@4.0.0-9-managed-package-release": "04t5Y000000XJZ7QAO", + "Nebula Logger@4.2.0-0-more-fields-and-methods": "04t5Y000000Xg4wQAC" } -} \ No newline at end of file +}