Questions tagged [logging]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
54
votes
1answer
813 views

How does Salesforce determine where to apply the “*** Skipped X bytes of detailed log” section in a log

Firstly, this question isn't about how to access missing log content when a *** Skipped 53353122 bytes of detailed log style message is encountered. That is covered in another question and resolves ...
25
votes
4answers
3k views

Need to get logfile smaller

I have a massive log file which breaks the 2Meg limit and hence truncates. There is some information I need that I am logging by doing System.debug However, I don't get to see because of the ...
22
votes
4answers
7k views

How to check debug logs for installed App?

how to check debug logs for installed app? Is there any way to check those ? What are the best ways/practice to follow when developing app, so that we can get some logs in case something goes wrong on ...
18
votes
2answers
2k views

How to efficiently profile Visualforce components and their controllers?

I have a quite complex Visualforce component (edit grid) that is running to slow (2-4 seconds to display) When I say complex I mean: The Component itself is calling other components Many thousand ...
16
votes
1answer
2k views

Developer Console suddenly truncating System.Debug output

Like many devs, I use JSON.Serialize() with System.Debug() to output large lists/objects to the Debug Log when needed. Over the past few days, I've run into a new issue with Developer Console where ...
16
votes
1answer
400 views

What is the 'INTERNAL' debug level?

According to Setting Debug Log Filters, the debug levels for each category are as follows: ERROR WARN INFO DEBUG FINE FINER FINEST However, when we create a new User Trace Flag (Setup > Logs > Debug ...
14
votes
2answers
8k views

Maximum log level exceeded in Developer Console

Recently I have regularly been getting the error message below when opening the Developer Console: The Developer Console didn't set the DEVELOPER_LOG trace flag on your user. Having an active ...
14
votes
3answers
5k views

Can I throw an exception in apex and still log the caught exception?

I'm really wrestling with the best error handling strategy. My goal is to handle all exceptions that I can identify, log them to a table in the database, and surface a helpful message about what ...
14
votes
1answer
4k views

Get Currently Executing Class/Method Name?

I have seen a few different flavors of exception logging utility out there, and a common concept is to capture the class and method that were running when the exception was thrown. In the case that ...
14
votes
2answers
26k views

Where can I read the debug output of test classes

Suppose I have a test class TestClassName. @isTest private class TestClassName { static testMethod void testMethodName() { System.debug('My debug statement'); System.assertEquals(1, 1)...
13
votes
3answers
19k views

Best practices for monitoring Scheduled Apex and Batch Apex?

We have multiple Apex jobs running, both from Schedulable and Batchable code. While an attentive SA could examine the Apex Jobs list to check that everything is OK, it seems a better idea to have ...
12
votes
4answers
5k views

Console.log truncates my debug `…}`

I'm using developer console log to see all my debug logs but it cuts off my log after 1920 characters How do I fix that? and even I have tried download the log and open in a notepad++ but still I ...
12
votes
3answers
498 views

Trigger on ApexClass Object

I want to try to log changes on apex classes in my org. Everytime the apex class is edited by someone i want to log the username and timestamp. Sounds easy but as i tried to write a simple trigger on ...
12
votes
3answers
3k views

Inconsistent logging output!

I am trying to log some values for general testing and I am getting some really strange behaviour. Some of the logs are just not printing. This is what is happening: I am pressing a button that runs ...
11
votes
1answer
354 views

Is $A.log (aura.log) long gone?

A colleague flagged the availability of $A.log (found in a blog) so we've spent a short while looking at it. The links from e.g. How to use aura.log() and where does it print it output? now point to ...
9
votes
1answer
6k views

Best practice to monitor Apex function execution time/performance?

We have been running on Salesforce platform for just over 6 months with considerate amount of customizations. The data volume has been growing and features have been added into existing codebase ...
8
votes
1answer
923 views

Expense of using System.debug

I've seen code on an inherited project output debug info while iterating large collections of objects. System.debug(Logginglevel.DEBUG, 'sQuery=' + sQuery); If the system logging level is set ...
8
votes
1answer
2k views

Issues displaying logs in Developer Console? Possibly Summer 15 related

I tend to keep a Developer Console open when testing code, so that I can get debug logs automatically for my session. Today I am finding that when I open the console I do see logs appear, but after a ...
8
votes
1answer
357 views

Does the Summer ’15 release remove the ability to set test logging levels with the DebuggingHeader?

The Summer ’15 release notes have a section called Receive Debug Logs Predictably. It currently states that the order of precedence for debug logs will be: Trace flags set in the Developer ...
7
votes
4answers
4k views

No log for Visualforce errors

I'm having a problem that I think has something to do with recent version because I don't remember having this problem before. Basically, when I have an error in a Visualforce page, I don't see the ...
6
votes
2answers
2k views

How can I query the LoginHistory object from Apex?

It is sort of available via the user interface, and sort of available via API calls (after v21), and sort of available via reports - but I want to actually query the object directly and drive ...
6
votes
3answers
3k views

Access to debug logs in managed package

Should you need a custom logging class for your managed package? I'm aware that you can use subscriber support but is there any benefit of using custom logging? If you do implement a custom logger, ...
6
votes
1answer
535 views

Is there a better way to debug Salesforce automation (triggers/workflows/process builder) than Developer Console > Perspective Manager?

I have some very simple automation in place for demoing Salesforce "Order of Execution". I have a field on called Version__c which increments by 1 in a trigger and a workflow. This is what happens: ...
6
votes
1answer
58 views

What determines the API version of a Debug log when the request is initiated from a standard page layout

The raw debug log starts with a header line like the following: 37.0 APEX_CODE,FINEST;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WORKFLOW,INFO From the ...
5
votes
3answers
9k views

MAXIMUM DEBUG LOG SIZE REACHED

I am running Apex Tests and I need to see the debug value So I have used debug statements similar to below one: System.debug(Logginglevel.ERROR , ' ::::::: My Debug :::::::::::::') ; Still I am ...
5
votes
2answers
10k views

How can I see when a workflow rule exceuted?

I want to be able to check when a workflow rule executed and see the result, is there a way of doing this?
5
votes
2answers
409 views

Custom Logging, @Future, Transaction Control

I have a similar question to these two: Custom Logging and Future Methods Custom Exception Handling & Logging But my question this time is: can I put the @Future annotation on the Logger Class? ...
5
votes
1answer
714 views

Exceptions and DML

It was to my understanding that when you throw an exception all previous operations are rolled back. When an exception occurs, code execution halts and any DML operations that were processed ...
5
votes
1answer
11k views

How to see full Status Detail of Apex Job

I have an apex job that is failing with a null pointer exception. The status detail unfortunately cuts the stacktrace just short of where it is actually helpful. Is there anyway to view the full ...
5
votes
1answer
2k views

How do I tell if a message was sent to a contact?

I am trying to troubleshoot emails not being received by a customer. Under the contact I see that the user sent 1 email to the customer. However, in the log file I see 2 internal message id's, 2 ...
5
votes
1answer
209 views

Debug Log issues in Winter/Summer '16

Lately we have been noticing issues with the Debug Logs. Missing debug lines Sometimes either CODE_UNIT_STARTED or CODE_UNIT_FINISHED goes missing. For example The log shows when a trigger finished ...
4
votes
3answers
316 views

What do the colors in Developer Console's Save Order tab represent?

Background/Explanation: If you use Developer Console, and you open a Log file with the Analysis or All Perspective's enabled (Debug > Switch Perspective), you gain a "Save Order" tab that shows ...
4
votes
1answer
1k views

Is login history only stored for 6 months?

Is login history only stored for 6 months? I appreciate it's in the security audit controls workbook: Because of the volume of data, login history is automatically removed after six months. If you ...
4
votes
1answer
165 views

Is it possible for an SFDC Apex unit test to parse a debug log?

I'm currently playing around with SFDC-Http Integration and the new Mock server functionality. In the Apex code which I am testing, I have this branch condition: if (response.getStatusCode() != 200) ...
4
votes
1answer
44 views

Using SendLog to retrieve User-Initiated Send name for each Job Id

After realizing that it is not possible to receive the name of the User-Initiated Send in the Data Extract activity of Automation Studio, we contacted Salesforce for a workaround. Our client, in ...
4
votes
3answers
5k views

REST Api Debug logs

Does anyone know how to enable debug logs for code executed through a REST interface? I have a stream of data that comes into Salesforce, but it is a nightmare trying to debug it based solely on the ...
4
votes
0answers
79 views

Debug Logs / LMA / and Async methods

Can anyone confirm that when logged into a subscriber org via the LMA that debug logs for your namespace are still obfuscated when running async methods (future, batch, etc). If so, is there a work ...
3
votes
3answers
4k views

Salesforce Email Service Debugging

I have defined an email service which unfortunately isn't working. Is there a place I can monitor errors? The class doesn't appear in debug logs.
3
votes
1answer
524 views

Custom Logging and Future Methods

I have been reading up on the custom logging, DML, and exceptions but haven't seen anything that talks about @Future methods and exceptions. I have two scenarios: A Button is clicked on a Lead, ...
3
votes
3answers
814 views

Adjust logging levels during code deployment?

Is there a way to adjust the various logging levels when deploying code to production through the IDE? The log is being truncated and I'm not seeing error details that are preventing my deployment. ...
3
votes
1answer
1k views

Debug Log of deployment test execution

Is it possible to see debug logs from Deployment Tests? I'm having some test's fail and it would be very helpful to see the logs.
3
votes
1answer
117 views

I have a failing API call. What tools can I use to investigate it?

Yesterday my app made 23 calls to salesforce's API that failed, and I would like to find a record of those calls on salesforce user account. After about an hour of looking, I haven't been able to ...
3
votes
2answers
808 views

Log Exceptions during trigger in a custom object

I need to capture exceptions that happen during trigger executions in a custom object. The conclusion here, is that there is no way to do this. Is it possible to hit a Apex webservice callout which ...
3
votes
2answers
602 views

How can I tell how long a user was logged in?

Please note that I don't want to know the interval between logins - I want to know how many minutes (or hours) elapsed between a login and the subsequent logout. Is it possible to calculate this in ...
3
votes
1answer
89 views

Debug Log Issue: Cannot set class-level logging (only trigger)

In an effort to remove unwanted ENTERING_MANAGED_PKG messages (which I cannot get rid of in Summer 17, I thought I'd try adding class-specific logging: From the Dev Console, choose Debug->Change ...
3
votes
2answers
232 views

Using Debug Logs Efficiently for Tracking Errors

A general question. We all put some System.debug() statements in our controllers for error handling, for info messages, etc. But there are plenty of logs in the system. When some exception throws, ...
3
votes
1answer
279 views

ExactTarget JAVA-SDK - Turn off logging of each SOAP Call

Please advise on how to turn off the SDK logging of each SOAP Call. I must be missing something obvious...Thank you!
3
votes
0answers
132 views

Bulk API doesn't print debug messages to the logs

We are experiencing an issue which looks like a different system user (possibly) is used to run asynchronous triggers when loading data with the Bulk API. The reason I think this is because of the ...
2
votes
2answers
2k views

How can I generate debug logs when I run unit tests from MavensMate?

Generating and viewing debug logs in MavensMate has been clarified before and works great for me - I especially like the Scrub feature. However, I can't generate a log when I run unit tests. To ...
2
votes
2answers
1k views

In System Logs what does the false|true mean for Variables

There's a lot I don't understand about the Execution Logs from Salesforce. Maybe some of it is just my limited programming experience (Apex mostly, smattering of Python). I feel like there must be ...