Questions tagged [logging]
The logging tag has no usage guidance.
149
questions
57
votes
1
answer
1k
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 revolves ...
25
votes
4
answers
4k
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 ...
23
votes
4
answers
8k
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 ...
21
votes
1
answer
10k
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 ...
18
votes
3
answers
41k
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)...
18
votes
2
answers
10k
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 ...
18
votes
2
answers
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
4
answers
17k
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 ...
16
votes
2
answers
22k
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 ...
16
votes
3
answers
21k
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 ...
16
votes
1
answer
526
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
4
answers
8k
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 ...
12
votes
3
answers
666
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
3
answers
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
1
answer
520
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 ...
10
votes
1
answer
22k
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 ...
10
votes
1
answer
12k
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 ...
10
votes
2
answers
3k
views
Logging frameworks that use Platform Events - what is the full list?
I've found these two excellent projects:
Andrew Fawcett's Advanced Logging with Platform Events
Robert Sösemann's Apex Unified Logging
that use Platform Events for logging and include a client to ...
9
votes
1
answer
2k
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
4
answers
5k
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 ...
8
votes
1
answer
3k
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
1
answer
443
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
2
answers
3k
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 ...
7
votes
3
answers
9k
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, ...
7
votes
1
answer
1k
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
3
answers
11k
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 ...
6
votes
2
answers
16k
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?
6
votes
1
answer
4k
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.
6
votes
1
answer
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 ...
6
votes
1
answer
212
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
3
answers
624
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 ...
5
votes
2
answers
1k
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
1
answer
3k
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
1
answer
268
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
3
answers
8k
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.
4
votes
1
answer
3k
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
1
answer
320
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
3
answers
10k
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
1
answer
847
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
0
answers
194
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 ...
4
votes
1
answer
3k
views
Deployment Results - What do the Line and Column refer to?
I am trying to deploy an application from a sandbox to production. Validation of the inbound change fails. When I view the reasons for the failure I see there are five headings in the Component ...
3
votes
2
answers
2k
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 ...
3
votes
1
answer
874
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
3
answers
1k
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
1
answer
123
views
Streaming logs in API 37 and up
In API 36 you could subscribe to a streaming topic (/systemTopic/Logging) for logs. As of API 37, that no longer seems to work.
How do you subscribe to the logging steaming topic in API 37+?
3
votes
1
answer
191
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
2
answers
869
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
2
answers
1k
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
1
answer
754
views
SFDX: Auto-Generated Log Levels are set to 'INFO' by default
I have an understanding of how debug logs work with the Developer Console and how to configure the log levels below in the UI, however, I'm unsure of how to set these log levels in VS Code with SFDX ...
3
votes
1
answer
334
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 ...