You need to sign in to do that
Don't have an account?
![Mitch McConnell Mitch McConnell](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
Where to find batch error logs?
We have two batch jobs that run just after midnight. When I run it manually via the Developer Console Anonymous window, they run fine. But last night, the "Apex Jobs" window showed that they failed. The Status states:
Completed First error: Attempt to de-reference a null object
Now I know what that means, but I have no information to debug it. As I said, when I run it manually I can turn on the debug logs, but it does not fail.
It seems odd that there is no "master error log" where I can see more about what happened... or is there?scheduled-apex
Completed First error: Attempt to de-reference a null object
Now I know what that means, but I have no information to debug it. As I said, when I run it manually I can turn on the debug logs, but it does not fail.
It seems odd that there is no "master error log" where I can see more about what happened... or is there?scheduled-apex
If you use Scheduled Apex to run the batch, you can get the job submitter at Monitor|Jobs|Scheduled Jobs.
Then in Logs|Debug Logs, setup monitoring that specific user (the submitter).
You can find the log once the job runs.
Hope this helps.
David
What I usually do is to catch the exception and create a document with the exception message and trace.
To make it easier to locate you can put them in a fixed folder.
The other option is to send an e-mail, but it can get a bit anoying if it fails very often.
Kind regards.