-
Notifications
You must be signed in to change notification settings - Fork 2
/
README.txt
77 lines (52 loc) · 2.08 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
=== CBX WP Write Log ===
Contributors: codeboxr,manchumahara
Tags: log,debug,email,mail
Requires at least: 3.0.1
Tested up to: 6.1.1
Stable tag: 1.0.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
A simple dev plugin that helps to write something to debug log file
== Description ==
This plugin adds a helper function to write log in wordpress debug file. This plugin also writes email send fail logs
Usages:
01. Write log
```php
if (function_exists( 'write_log' ) ) {
write_log('testing a variable output');
write_log($name);
}
```
02. View Log
[http://your_domain/?](http://your_domain/?cbxwpwritelog=1)
For any query [contact us](https://codeboxr.com/contact-us/)
== Installation ==
This section describes how to install the plugin and get it working.
e.g.
1. Upload `cbxwpwritelog` folder to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. call function `<?php write_log('your content, variable or object here'); ?>` in your templates or plugin anywhere where you need to
4. There are other ways to install a plugin please check WordPress Codex https://codex.wordpress.org/Managing_Plugins
To enable debug you need put following in your WordPress wp-config.php file
```php
//to enable debug
define('WP_DEBUG', true); //enable debugs
define( 'WP_DEBUG_DISPLAY', true); //displays debug , if you don't show set it false
define( 'WP_DEBUG_LOG', true); //stores debug in wp-content/debug.log or as you configure your wp content folder
//to enable/disable email fail or success debug
define('CBXWPWRITELOG_EMAIL_FAILED', false); //set true to enable email fail debug
define('CBXWPWRITELOG_EMAIL_SENT', false); //set true to enable email success debug
```
# Screenshots
![screenshot](https://raw.githubusercontent.com/manchumahara/cbxwpwritelog/master/assets/screenshot-1.jpg)
== Frequently Asked Questions ==
== Screenshots ==
== Changelog ==
= 1.0.4 =
* View error log http://your_domain/?cbxwpwritelog=1
= 1.0.3 =
* Debug boolean in better way
= 1.0.2 =
* Email sent or fail debug
= 1.0.1 =
* Initial version released