Enabling verbose logging temporarily

Loading

Verbose logging in Power Pages is a powerful tool to help developers and administrators troubleshoot complex issues, particularly those related to authentication, Liquid templating errors, page load behaviors, and data access problems. By temporarily enabling verbose logging, you can capture detailed logs of what’s happening in the backend without permanently impacting performance or security.

Here’s a step-by-step guide on how to enable verbose logging temporarily in Power Pages.


1. What is Verbose Logging?

Verbose logging increases the amount of diagnostic information logged by the portal. It includes:

  • Authentication tokens and claims
  • Entity permissions access
  • Liquid template rendering steps
  • API call traces
  • Web role validations
  • Plugin and workflow execution feedback

Use cases include:

  • Debugging broken authentication
  • Investigating role-based access issues
  • Tracing Liquid or Web Template behavior
  • Identifying misconfigured entity permissions

2. Prerequisites

Ensure that:

  • You have Administrator access to the portal.
  • You can access the Portal Management app or Power Platform Admin Center.
  • You’re working in a non-production environment (for best practice).

3. Enable Verbose Logging – Portal Management App

Step 1: Open the Portal Management App

Step 2: Add or Edit Site Settings

Go to: Portal Management > Site Settings and add the following settings:

NameValueDescription
Diagnostics.TraceEnabledtrueEnables diagnostics tracing
Diagnostics.TraceLevelVerboseSets trace level to verbose
Diagnostics.WriteToLogFiletrueOptional – writes logs to log file
EnableCustomErrorsfalseShows error details on-screen (dev only)
ShowExceptionDetailsOnErrorPagetrueShows full exceptions in portal UI (dev only)

Note: Ensure these settings are removed or disabled after debugging to prevent exposing sensitive information.


4. Review Logs

Option A: View in Portal Trace Log Table (Preview Feature)

In recent portal updates, logs can be viewed via the Portal Logs table in Dataverse.

  • Navigate to Tables > Portal Diagnostics Logs
  • Filter by timestamp or severity
  • Logs include session info, trace level, and error messages

Option B: Browser Developer Tools

You can also look at:

  • Network responses for Liquid errors
  • Console output for JavaScript runtime issues
  • HTTP headers for user claims or identity issues

5. Use a Short Time Window

Because verbose logging increases resource usage:

  • Enable logging for 10–30 minutes
  • Conduct your test or reproduce the issue
  • Then turn it off immediately

6. Disable Verbose Logging (Post-Debug)

Once debugging is complete, revert the settings:

NameValue
Diagnostics.TraceEnabledfalse
Diagnostics.TraceLevelOff
EnableCustomErrorstrue
ShowExceptionDetailsOnErrorPagefalse

7. Troubleshooting with Logs

Here are some examples of what you can find in verbose logs:

IssueWhat Logs Reveal
403 ErrorsMissing web roles or entity permissions
Login LoopMisconfigured identity provider or claim mismatch
Page not renderingLiquid rendering error or null entity
Data not savingPlugin or business rule exception

8. Additional Tips

  • Use unique session IDs (from logs) to trace across events.
  • Pair verbose logging with Fiddler or Postman for testing backend APIs.
  • Use {{ user | json }} or {{ entity | json }} in templates to inspect objects directly.

9. Recommended Logging Settings by Stage

EnvironmentTrace LevelCustom ErrorsVerbose Logging
DevVerboseDisabledEnabled
QA/StagingWarningEnabledTemporarily
ProductionOffEnabledDisabled

Leave a Reply

Your email address will not be published. Required fields are marked *