To activate debug logging for users, Apex classes, and Apex triggers, configure trace flags and debug levels in the Developer Console or in Setup. Each trace flag includes a debug level, start time, end time, and log type. The trace flag’s log type specifies the entity you’re tracing. You can navigate to Setup->Debug then you will see the below screen for trace logs configured in your instance. If you want to query Trace Log for your instance using Apex then you can use following SOQL query for the same. But please check API Tooling checkbox in developer console while querying. 1. To Query all trace log SELECT Id, CreatedDate, CreatedById, ExpirationDate, LogType,TracedEntityId,TracedEntity.Name, ApexCode, ApexProfiling, Callout, Database, System, Validation, Visualforce, Workflow FROM TraceFlag 2. To Query trace log only for class SELECT Id, CreatedDate, CreatedById, ExpirationDate, LogType,TracedEntityId,TracedEntity.Name, ApexCode, ApexProfiling, Call...
Comments
Post a Comment