Make WordPress Core

Changes between Version 2 and Version 3 of Ticket #30934, comment 9


Ignore:
Timestamp:
07/15/2020 01:16:10 AM (5 years ago)
Author:
thomasprice61
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30934, comment 9

    v2 v3  
    1919=== Proposed Enhancement:
    2020* Develop a core function ''wp_log()''
    21 * Characteristics should:
    22   * Include in its simplest (default) use case a wrapper for ''error_log()'' to send a message to WP_DEBUG
    23   * Optionally allow a developer to configure:
    24     * log destinations (screen and file. Maybe suggest ''wp-content/logs/plugin-name/log-file-name'')
    25     * log structure (example: ''[YYYYMMDD hh:mm:ss]level message'')
    26   * It could also include hooks so 3rd parties can further enhance logging (example: allow a 3rd party to configure rolling log files, log to external log sinks, etc)
     21* Characteristics should allow a developer to configure:
     22  * log destinations (''error_log()'', screen and file. Maybe suggest ''wp-content/logs/plugin-name/log-file-name'')
     23  * log structure (example: ''[YYYYMMDD hh:mm:ss]level message'')
     24* It could also include hooks so 3rd parties can further enhance logging (example: allow a 3rd party to configure rolling log files, log to external log sinks, etc)
    2725
    2826=== Suggested approach:
    2927* There are a number of existing libraries that may be a suitable starting point:
    30     * [https://github.com/jbroadway/analog]
    31     * [https://github.com/katzgrau/KLogger]
     28  * [https://github.com/jbroadway/analog]
     29  * [https://github.com/katzgrau/KLogger]