jongpie / NebulaLogger

The most robust logger for Salesforce. Works with Apex, Lightning Components, Flow, Process Builder & Integrations. Designed for Salesforce admins, developers & architects.
https://nebulalogger.com
MIT License
651 stars 155 forks source link

Nebula logger - Error Notification #695

Open itague opened 1 month ago

itague commented 1 month ago

Package Edition of Nebula Logger

Unlocked Package

Package Version of Nebula Logger

v4.13.11

New Bug Summary

Hi, I don't know if it's a bug...

I'm receiveng a lot of emails, all with subject Nebula Logger - Error Notification - company (org id) and following message body:

Logger failed to save 1 LogEntryEvent__e records for _**username**_ (Schema.User ID: **_xxxxxxxxxxxxxxxxxxxxxxx_**)

Errors:

- StatusCode: STRING_TOO_LONG, Message: Value too long for field, Field(s): [Message__c]

How to understand where above errors were raised?

jongpie commented 1 month ago

Hi @itague - I think this is a bug, but I have not been able to reproduce the issue yet (see my comment here). Are you still receiving error emails about this?

itague commented 1 month ago

Unfortunately I'm still receiveng too much emails like above. In our production Org, there is a batch job that call an external web service each 10 minutes and almost all logger.log calls send an email with this error.

jongpie commented 1 month ago

@itague can you try updating your records in LoggerSettings__c to set IsDataMaskingEnabled__c to false? My theory is that data masking is part of the problem, so if you can change that value & the error emails stop, then I think that will validate my theory.

itague commented 1 month ago

I'm afraid but IsDataMaskingEnabled__c is already set to false.

jongpie commented 1 month ago

@itague thanks for checking the value of IsDataMaskingEnabled__c - since it's already false, then something else must be causing the problem. I'm reviewing the code & so far, nothing else seems to explain the issue, but I'll continue looking.

In your batch job, which logging methods are you using? Are you using something like Logger.debug('some string') to log? Or are you using any other methods/features/approaches for logging?

itague commented 2 weeks ago

Hi, I'm using log.error('string', ex) method.