Title: Debug Logger
Author: Andrew Woods
Published: <strong>Igbe 30, 2021</strong>
Last modified: Èbìbí  3, 2021

---

Ṣàwárí àwọn plugin

Plugin yìí **kò tíì ṣe àyẹ̀wò pẹ̀lú àwọn ìtújáde mẹ́ta pàtàkì tó kẹ́yìn ti WordPress**.
Ó lè jẹ́ pé a kò tọ́jú tàbí ṣe àtìlẹ́yìn fún un mọ́, ó sì lè ní àwọn ọ̀ràn ìbámu
nígbà tí a bá lò ó pẹ̀lú àwọn ẹ̀yà WordPress tuntun.

![](https://s.w.org/plugins/geopattern-icon/debug-logger.svg)

# Debug Logger

 Láti ọwọ́ [Andrew Woods](https://profiles.wordpress.org/awoods/)

[Ṣe ìgbàsílẹ̀](https://downloads.wordpress.org/plugin/debug-logger.0.3.0.zip)

 * [Àwọn àlàyé](https://yor.wordpress.org/plugins/debug-logger/#description)
 * [Àwọn àgbéyẹ̀wò](https://yor.wordpress.org/plugins/debug-logger/#reviews)
 *  [Ìgbéwọlẹ̀](https://yor.wordpress.org/plugins/debug-logger/#installation)
 * [Ìdàgbàsókè](https://yor.wordpress.org/plugins/debug-logger/#developers)

 [Ìrànlọ́wọ́](https://wordpress.org/support/plugin/debug-logger/)

## Àpèjúwe

As PHP moves forward, so must WordPress. This plugin helps WordPress use the tools
of modern PHP. Monolog — PHPÌtumọ̀ Yorùbá: ’s most popular logging package — is 
a composer package. Since WordPress doesnÌtumọ̀ Yorùbá: ’t currently have a universal
way to support composer, this WordPress plugin is meant to start bridging the gap.
This logger is [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md)
compliant, a PHP standard which Monolog also uses.

### Logging Levels

There are 8 logging levels available, [defined by RFC 5424](https://tools.ietf.org/html/rfc5424).
The levels specified in
 order from the most severe to the least severe:

 * **Emergency**: system is unusable
 * **Alert**: action must be taken immediately
 * **Critical**: critical conditions
 * **Error**: error conditions
 * **Warning**: warning conditions
 * **Notice**: normal but significant condition
 * **Info**: informational messages
 * **Debug**: debug-level messages

## Ìgbéwọlẹ̀

This section describes how to install the plugin and get it working.

 1. Upload the `wp-debug-logger` folder to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Enable debugging in your `wp-config.php`
 4. // in your wp-config.php
     define( ‘WP_DEBUG’, true ); define( ‘WP_DEBUG_DISPLAY’,
    false ); define( ‘WP_DEBUG_LOG’, true ); define( ‘WP_DEBUG_MINIMUM_LEVEL’, ‘debug’);
 5. // For good measure, this will hide errors from being displayed on-screen
     @ini_set(‘
    display_errors’, 0);
 6. As you write your code, sprinkle in these Log methods.

#### Minimum Level

WP_DEBUG_MINIMUM_LEVEL is a new constant that determines the minimum severity level
you wish to write to your _wp-content/debug.log_ file. In your _development_ environment,
I recommend using `debug` so you can see all the errors being written. For your 
_production_ environment, IÌtumọ̀ Yorùbá: ’d recommend the `error` level, so you
can capture all the significant problems. Here are the values to use: **emergency,
alert, critical, error, warning, notice, info, debug**. Note: theyÌtumọ̀ Yorùbá:’
re all lowercase, as the value is case-sensitive.

#### Displaying Errors

In your **development** environment, you may choose to set `WP_DEBUG_DISPLAY` to`
true`, so the error messages show in your browser. However, I **strongly recommend**
that you do not change it, for your _production_ environment. These settings can
be placed anywhere above the line.

    ```
    /* That’s all, stop editing! Happy blogging. */
    ```

## FAQ

### Why not just use the error_log function?

You still can. However, the plugin will add value to your logging efforts. Using
this logger will add structure io the debug.log file, _and_ give you a modern PHP
interface to control the amount of logging in your website. The logging methods 
in this plugin also provide information about the severity of the error.

### Where can I find more documentation?

This project is [developed on Github](https://github.com/andrewwoods/wp-debug-logger).
There is a more complete readme there, with links to supplemental information.

### Why use PSR-3?

A PSR is a PHP Standard Recommendation. PSRs are use to create and maintain interoperability
between PHP-based frameworks and content management systems.

## Àwọn àgbéyẹ̀wò

Kò sí àwọn àgbéyẹ̀wò fún plugin yìí.

## Àwọn Olùkópa & Olùgbéejáde

“Debug Logger” jẹ́ ètò ìṣàmúlò orísun ṣíṣí sílẹ̀. Àwọn ènìyàn wọ̀nyí ti ṣe ìkópa
sí plugin yìí.

Àwọn Olùkópa

 *   [ Andrew Woods ](https://profiles.wordpress.org/awoods/)

[Túmọ̀ “Debug Logger” sí èdè rẹ.](https://translate.wordpress.org/projects/wp-plugins/debug-logger)

### Ṣe o nífẹ̀ẹ́ sí ìdàgbàsókè?

[Ṣàwárí koodu](https://plugins.trac.wordpress.org/browser/debug-logger/), ṣàyẹ̀wò
[ibi ìpamọ́ SVN](https://plugins.svn.wordpress.org/debug-logger/), tàbí ṣe àgbékalẹ̀
sí [àkọsílẹ̀ ìdàgbàsókè](https://plugins.trac.wordpress.org/log/debug-logger/) nípasẹ̀
[RSS](https://plugins.trac.wordpress.org/log/debug-logger/?limit=100&mode=stop_on_copy&format=rss).

## Àkọsílẹ̀ àwọn àyípadà

#### 0.3.0

 * Add the ability to log WP_Error objects
    - Add `Log::wp_error()` and its corresponding `Logger->log_wp_error` method
    - Add method Logger->has_level() to ensure a level exists

#### 0.2.0

 * Add `Log::print()` and `Log::dump()` methods
 * Improve documentation

#### 0.1.0

 * Import PSR-3 from PHP FIG into `lib` directory
 * Create Logger class to write log
 * Create Log class to statically interact with Logger class
 * Add usage instructions and logging levels

## Àkójọpọ̀ Meta

 *  Ẹ̀yà **0.3.0**
 *  Ìgbàgbọ́hùn tó kẹ́yìn **ọdún 5 sẹ́yìn**
 *  Àwọn ìgbéwọlẹ̀ tó ṣiṣẹ́ **Tó kéré sí 10**
 *  Ẹ̀yà WordPress ** 5.7 tàbí ju bẹ́ẹ̀ lọ **
 *  Dánwò dé **5.7.15**
 *  Ẹ̀yà PHP ** 7.4 tàbí ju bẹ́ẹ̀ lọ **
 *  Èdè
 * [English (US)](https://wordpress.org/plugins/debug-logger/)
 * Àwọn àmì
 * [debug](https://yor.wordpress.org/plugins/tags/debug/)[logging](https://yor.wordpress.org/plugins/tags/logging/)
   [logs](https://yor.wordpress.org/plugins/tags/logs/)
 *  [Ìwòye Tó Péye](https://yor.wordpress.org/plugins/debug-logger/advanced/)

## Àwọn ìbò

Kò sí ìwádìí tí a tíì fi ránṣẹ́.

[Your review](https://wordpress.org/support/plugin/debug-logger/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/debug-logger/reviews/)

## Àwọn Olùkópa

 *   [ Andrew Woods ](https://profiles.wordpress.org/awoods/)

## Ìrànlọ́wọ́

Nǹkan wà tí o fẹ́ sọ? Ṣé o nílò ìrànlọ́wọ́?

 [Wo àpéjọ ìrànlọ́wọ́](https://wordpress.org/support/plugin/debug-logger/)