So in the previous video we understood about the significance of debug logs how the basically configured
a lot of debug logs.
So for configuring debug logs we need to create our trace flags and for creating trace flags for us
to we need to have over DEBUG level set.
So first we created our DEBUG level.
He used that DEBUG level for creating a trace flag.
And once the trace flag is set debug levels will get generated for that specific time frame.
And now that we have said the debug levels for the user and they use it as me.
And this is the start date.
And this is the end date.
So now what happens as you see there are no DEBUG level of debug logs because I have not basically done
anything in the application after enabling the trace flex.
So now what I'm going to do is I'm going to open opportunities and I'm going to create a new opportunity.
So let me say desktop opportunity for a particular stage and for some details I've created this opportunity.
Perfect.
Done.
Now let's go back to these debug logs.
Let's refresh the page ones a refresh the page.
You see that I debug logs are generated right hand for which use it for me.
And what is the status.
Success.
Because we have not encountered any error basically in this.
Whatever we did in our application.
Right.
So here for viewing the debug logs go to view either you can download it also for all you can view it
also.
So view debug logs and here you should be able to see everything whatever you did in the application
what we did.
We created an opportunity.
Right.
So it says this particular user has logged in and then we have created a new opportunity and the opportunity
is at best opportunity.
This is the opportunity I.T. we see some other process guards executed auto create contract on a.
So you can query were using this particular idea.
That is the idea of that process and you can see which process is that and the name is auto create contract
on account so let me go to process builder auto create contract on account.
So this is a process that does on the opportunity object then at a court is created or edited and the
criteria is opportunity stages close to one.
So basically now that we have created a new opportunity what happened.
The system actually has triggered this particular process because this process gets triggered whenever
an opportunity gets created or edited but then it did not satisfy the criteria because this process
is only for opportunity.
The stage is close to one so that is the reason we see that on creating a new opportunity.
This particular process has got pretty good but it is a false.
Basically it was not able to execute that particular process and then again another process post to
try to foreclose to one.
Again this process has got pretty good but then it did not go through because it did not again satisfy
the criteria for this particular process.
Right.
So what we are trying to understand us whenever we set these trace flags everything that a particular
user does gets recorded in the background so that we can see it in debug logs and if we face any issues
that euros also get logged here.
So that is the significance of these debug logs venues debug logs whenever we want to troubleshoot any
issues.
So he had access we do not have any issue.
We just created an opportunity but then again we have issues those the also get logged here.
So this is the importance of using debug logs.
So we have created that next opportunity and then he does try to execute this process but then the criteria
did not satisfy.
So he did not execute those process and also on finally does execution finished and also gives you the
overall limit usage like how many is Q iniquities as guard executed executed Gwydir rules.
All of these like all very much we'll be using these look you will is very much we'll be using whenever
you use Apex because the stance force has blocked it limits the number of limits the number of sexual
queries that can be used in a particular transaction easily yes silk readies and how many DOMA statements
can be excluded.
So since was as guard does so many Epix limits.
So if you are working on that then these data will be helpful to us.
So basically debug logs will help us understand all these which happens in the background.
This is all we use.
Leave of logs and these processes we are talking about sometimes these processes may run into some errors
and then a photo opportunity is created.
You know there may be multiple processes that may happen in the background right validation rules may
get triggered some process.
Builders may get regard Osama some Apex triggers may get regard in the background and one of the components
might fail so we might not be sure which component exactly fair and reducing that transaction.
All right so at those times at debug logs come to rescue.
So debug logs detailing give you like what all happens behind that transaction so it will be easy for
you to debug any issues perfect.
And now that we know how to configure debug logs and how to use a debug logs for troubleshooting issues
we should also be considerate while using debug logs.
In fact sales force has got its own limits for debug logs like the debug logs that we generate.
It can be like only 20 M B or smaller files so each logger must be the maximum off lock to in the end.
So that is the reason we have but while setting up all the debug levels we have different categories
and we have the levels that we need to set for categories.
So you know we can only set the maximum level for the categories that we are interested in so that unnecessarily
we do not to generate the bulky debug logs.
So.
So whenever you set your debug level set it according to your requirement.
So each debug block.
It must be a maximum of 20 m b c if it is larger than 20 and B then it basically what happens is they
are reduced in size by removing the older log lines such as in all those earlier a system that debug
statements and also those lines will be removed.
So your debug logs may not be complete so cabin Ionia debug level and set it accordingly.
And also like while using the time frame also tools only the time frame in which you are doing your
testing the maximum time frame that we can set just 24 hours.
We know that we just started up a trace flag using that Mark always said it only for that particular
time frame when you are doing your testing.
If you're doing it only for 10 minutes just at only for 10 minutes so that you do not generate some
unnecessary logs.
And the other thing is you should generate more than thousand envy of debug logs within 15 minutes in
a 15 minute time window.
Then the trace flags are disabled they are automatically disabled and also be good an e-mail notification
saying that the trace flag has been disabled so don't accumulate a lot of debug logs and then if your
org accumulates more than a thousand and B of debug logs then automatically what happens is other users
will not be able to add a more trace flags.
So whenever the situation happens what we need to do is we need to just delete off all the older debug
logs so that we have space for new debug logs so never accumulate debug logs.
Whenever you have used a debug log file your troubleshooting book was just delete them off.
If you don't need it then and there so that you know we don't accumulate unnecessary once and for deleting
debug logs it is as simple as this.
So here in debug logs you have this delete option delete the debug.
That's it.
And as a system administrator I always ensure that debug logs do not get accumulated here.
So you may need to visit the site then and there and see that all the users have and they have deleted
the logs accordingly and you can also ensure that the team does it mostly to be used by developers and
administrators so you can also send out an email communication asking the users not to let Kimberly
debug logs and just delete those unnecessary ones so that we have space for new debug logs to get generated.
And also even during our deployments you can be before actually starting any a deployment.
Be sure that there are no debug logs actually with the maximum level set for the apex court because
again in those cases the unnecessary accumulation of debug logs will happen because if the Apex up in
the Apex category if you have set it to the maximum level then during deployments the code will get
executed and many unnecessary debug logs will get accumulated.
So as a system admin before doing the deployment you can have this also RSA check for you so this is
all about debug logs.
Basically this is an excellent tool for life troubleshooting.
This is an excellent tool version which records everything that you do in a particular time frame you
can see it like you can do that and immediately come back to debug logs and see what you did basically
in that particular time frame.
So it does a very excellent tool and it really helps in real time for solving many of your issues that
you haven't sales force.