Make WordPress Core

Opened 7 days ago

Last modified 6 days ago

#65791 new enhancement

configurable debug log entry

Reported by: hupe13 Owned by:
Priority: normal Milestone: Awaiting Review
Component: Administration Version:
Severity: normal Keywords: close
Cc: Focuses: administration

Description

Is it possible in WP_DEBUG_LOG:

  • to use the server time, local time or any other time as UTC?
  • to log the site url?

Maybe that could also be made configurable.

For example instead:
"[01-Aug-2026 20:26:03 UTC] Automatic updates complete."
this one:
"[01-Aug-2026 22:26:03 MESZ] https://my-domain.tld Automatic updates complete."

Change History (1)

#1 @TobiasBg
6 days ago

  • Keywords close added

Thanks for the suggestion!

WP_DEBUG_LOG "only" defines the location of the log file that is used.

The actual logging is then performed by PHP itself, where WP Core is providing the log text only. Thus, there's probably not too much that WP can do here, unless the logging would be refactored.

A custom workaround that you could try, at least for the site URL, would be to use the filter/action hooks for the Updater and then add custom log entries with the site URL.

Note: See TracTickets for help on using tickets.