The Leaky Paywall debug log

Leaky Paywall keeps a log file to help diagnose problems with signups, renewals, and payments. You will find it at Leaky Paywall > Tools > Debug Log.

What gets recorded

By default, only errors: a failed payment, a rejected webhook from your payment gateway, a signup that could not be completed. These are recorded all the time, so if something goes wrong you have a record of it without having had to switch anything on in advance.

Passwords are never written to the log.

Detailed logging

The Detailed Logging checkbox records everything Leaky Paywall does, not just errors. That includes subscriber email addresses and the full responses from your payment gateway.

Turn it on when you are trying to reproduce a problem, or when our support team asks for it. Then turn it off again. Nothing switches it off for you.

Turning detailed logging on gives the log a new name and starts it empty, so what you send us contains your reproduction and nothing else.

Sending us the log

  1. Go to Leaky Paywall > Tools > Debug Log.
  2. If we have asked for detailed logging, tick Detailed Logging and click Save, then reproduce the problem on your site.
  3. Click Download Debug Log File and attach the file to your reply.
  4. Untick Detailed Logging and click Save.

Clear Log deletes the log entirely, which is worth doing once an investigation is finished.

Where the file is kept

In a protected folder inside your uploads directory, under a name that cannot be guessed. It is not linked from anywhere on your site, and the folder carries rules that stop web servers from serving it.

Those rules are read by Apache. If your site runs on nginx, they are ignored, and the file could be downloaded by anyone who learned its name. If your site is on nginx and you would rather the log lived outside your website folder entirely, add this to wp-config.php, pointing at a folder above your web root:

define( 'LEAKY_PAYWALL_LOG_DIR', '/path/to/a/folder/outside/public_html' );

If you are not sure which web server you use, your host can tell you.

How large it gets

The log is capped. Once it passes 5 MB, or after 30 days, Leaky Paywall starts a fresh one and keeps the previous one. Anything older than that is deleted. When you download the log you get both, so you are not missing recent history.

Turning logging off completely

Errors are recorded even with detailed logging off, which is what makes support possible. If you need Leaky Paywall to write nothing at all, add this to your theme's functions.php or a code snippet plugin:

add_filter( 'leaky_paywall_is_debug_mode', '__return_false' );

Then use Clear Log to remove the existing file. Note that with this in place we will have nothing to work from if you report a problem.

For developers

  • LEAKY_PAYWALL_DEBUG constant overrides the setting.
  • leaky_paywall_is_debug_mode filter overrides both.
  • leaky_paywall_log_directory filter sets the log directory.
  • leaky_paywall_log_size_limit filter, in bytes, defaults to 5 MB.
  • leaky_paywall_log_retention_days filter, defaults to 30.
  • leaky_paywall_log_scrubbed_keys filter adds keys to redact before writing.

Still need help? Contact Us Contact Us