How to check debug logs for installed App?

Have a read of the Force.com discussion board post Logging from a deployed managed package. You can use subscriber support from the License Managing Application that is associated with the managed package.

Sadly this won't help you with a beta managed package or one that hasn't passed the app store certification yet. IMHO it is a bit of a hole in the logging functionality, as this is often when you most need access to the logging. I raised the idea Expose logging from a Beta managed package in the deployed org to see if the situation could be improved.

Outside of that the next best option is to create your own logging custom object and write important logging events there. I'd probably combine this with a custom setting so it is only written to when required.

Here is link how to check Debug logs for your app package - https://help.salesforce.com/apex/HTViewHelpDoc?id=apex_debugging_sub_org.htm&language=en_US


As Daniel said in his excellent accepted answer the subscribers tab is the way to go here. But there are a few holes in it. As mentioned, what to do about not-yet-reviewed apps, betas, or even just for customers that can't give you admin level logins (needed to set debug log monitored users) for compliance reasons.

And there is an answer here, although it's not publicly documented that I know of: open a salesforce case, identify yourself as the package author, and give the namespace and a timespan of how long the customer should be able to see your logs.

The "backline"/tier3 support folks have a tool that can expose logs for a specific namespace this way. I've used it many times for customers that had compliance issues to at least let them get logs to send us.


There is a solution that allows you to add logging for both a deployed managed package AND a beta managed package by using a third party service platform such as Loggly, Splunk or LogRythm to provide remote logging. Loggly for example has an HTTP/S service that you can use to send logs. There is even an open source Apex library called sloggly that lets you get started very quickly. Here's a code snippet from the web site:

Loggly.singleLog('Error Message', DateTime.now(), 'LEVEL');

As a bonus these logging platforms give you a lot of really handy features that the Salesforce System.debug() method does not such as highly configurable alerts and reporting.

NOTE: It's important to choose a vendor that supports HTTPS requests because that's all that Salesforce supports. HTTP or TCP will not work, which is why I didn't add LogEntries to the list (because they deprecated their HTTP API).