1

I have subscriber access for the org and have also created debug logs for the particular classes I need logs for. However, the scheduled job that runs still has the logs obfuscated. I can see the debug logs for visualforce page access but not for the background job. Is there a difference for scheduled job vs managed code in terms of logging? How do I enable logs for the scheduled job?

  • Is that possible to login as package support user, and then schedule job? I think in that case it will be possible to see non-obfuscated logs – kurunve Jun 14 '17 at 13:58
  • I tried that as well. But it is didn't work. I have enabled logs for the Schedular class and the core class. The core class isnt visible so can't run that directly – Tan Jun 14 '17 at 14:14
1

My experience with the subscriber access debug logging via the LMA application has been that it only exposes log messages for requests that originated from that subscriber session.

I.e. Say both you and the user that granted you login access are connected at the same time. Debug logs that originate from your session will have the associated managed package logging exposed. Where as the logs that originate from the actual users session will not.

That does present a bit of a challenge for scheduled jobs. You could try using system.schedule directly from the subscriber login session. However, I suspect this won't work. Worth a try though.

Maybe you can call the execute method directly in anonymous Apex? It would depend on how it uses the ScheduledContext.


I've raised the idea Allow License Management App to expose managed package logging for entire org. It would help deal with edge cases like this and make accessing the log much easier.

|improve this answer|||||
  • Thanks for your input. You are right that it shows logs only for your subscriber session and hence the scheduled jobs do not show up. However I tried running it through system.schedule and it didn't work. And I can't call the class directly since it is not global. I'm contemplating whether to make the class global. The only other option available is to contact support and enable namespace based logging. – Tan Jun 19 '17 at 14:40
  • @Tan Having support add your namespace to "Managed namespaces to log in Apex Debug Log" for a period would probably be the easiest option. I've added a link to an idea that would allow this setting to be controlled via the LMA directly. – Daniel Ballinger Jun 19 '17 at 19:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.