|
| 1 | +### About |
| 2 | +Debugging WordPress can sometimes be a pain, our goal is to make it easy, which is why Loginator was built with this in mind. From creating a log folder to securing it from prying eyes, Loginator is here to save you time and resources, so you can focus on creating astonishing applications. Once activated, Loginator essentially becomes a core part of WordPress, which is why we disable deactivation as it is highly recommended to not uninstall Loginator until you have removed all references to the `loginator` function inside your WordPress installation. |
1 | 3 |
|
| 4 | +## Demo |
| 5 | +[](https://youtu.be/k1o4zZC6dzs) |
2 | 6 |
|
3 | | -[](https://youtu.be/k1o4zZC6dzs) |
| 7 | +### Update |
| 8 | +2.0 has been released with backwards compatibility with 1.0. Your `loginator` function calls will still work so you can continue to use it, or our new static methods. |
4 | 9 |
|
5 | | -Debugging WordPress can sometimes be a pain, which is why **Loginator** was built to simplify the process. From automatically creating and securing a log folder to intelligently handling different types of logs, Loginator helps you save time and focus on building great applications. |
| 10 | +### Functional Example |
6 | 11 |
|
7 | | -Once activated, Loginator essentially becomes a core part of WordPress, which is why **plugin deactivation is disabled** to prevent runtime errors from missing log functions. |
| 12 | +```php |
| 13 | +loginator('Logging this message', array('flag' => 'd', 'id' => '', 'file' => 'logger', 'pipedream' => 'https://your-id-here.m.pipedream.net')); |
| 14 | +``` |
8 | 15 |
|
9 | | -## Features |
| 16 | +### Static Method Examples |
10 | 17 |
|
11 | | -### ✅ Free Features |
12 | | -- Global enable/disable switch |
13 | | -- Logging flags: `error`, `debug`, and `info` |
14 | | -- Automatically creates separate log files per flag |
15 | | -- Pretty prints arrays for better readability |
16 | | -- Inline documentation for use in IDEs like Visual Studio Code |
17 | | -- Prevents plugin deactivation to avoid fatal errors if log function is still in use |
| 18 | +```php |
| 19 | +Loginator::emergency('log data here'); // Email triggers to site admin or configured emails |
| 20 | +Loginator::alert('log data here'); |
| 21 | +Loginator::critical('log data here'); // Email triggers to site admin or configured emails |
| 22 | +Loginator::error('log data here'); |
| 23 | +Loginator::warning('log data here'); |
| 24 | +Loginator::notice('log data here'); |
| 25 | +Loginator::info('log data here'); |
| 26 | +Loginator::debug('log data here'); // PipeDream flag is set to true by default |
| 27 | +Loginator::success('log data here'); |
| 28 | +``` |
18 | 29 |
|
19 | | -### 💎 Premium Features |
20 | | -Available via [Loginator on PolyPlugins](https://www.polyplugins.com/product/loginator/) |
21 | | -- Email alerts on `CRITICAL` log entries |
22 | | -- Pipe Dream logging support |
| 30 | +You can also pass arguments: |
| 31 | + |
| 32 | +```php |
| 33 | +$args = array( |
| 34 | + 'flag' => 'd', |
| 35 | + 'id' => 23, |
| 36 | + 'file' => 'test', |
| 37 | + 'pipedream' => false, |
| 38 | +); |
| 39 | + |
| 40 | +Loginator::info('log data here', $args); |
| 41 | +``` |
| 42 | + |
| 43 | +### Features |
| 44 | + |
| 45 | +- Global Enable/Disable |
| 46 | +- Flags for Errors, Debug, and Info |
| 47 | +- Creates separate files based on flags |
| 48 | +- Our beautiful comments follow WordPress Developer Standards, that when paired with Visual Studio Code or other supporting IDEs will elaborately explain how to use the `loginator` function |
| 49 | +- Auto detect if data being logged is an array and pretty prints it to the file |
| 50 | +- Disable Loginator deactivation to prevent function not existing errors |
| 51 | +- Email on CRITICAL flag |
| 52 | +- Pipe Dream logging |
23 | 53 |
|
24 | 54 | ## Installation |
25 | 55 |
|
26 | | -1. **Backup WordPress** |
27 | | -2. Upload the plugin to the `/wp-content/plugins/` directory, or install it via the WordPress plugin manager. |
28 | | -3. Activate the plugin through the WordPress **Plugins** menu. |
| 56 | +1. Backup WordPress |
| 57 | +2. Upload the plugin files to the `/wp-content/plugins/` directory, or install the plugin through the WordPress plugins screen directly. |
| 58 | +3. Activate the plugin through the 'Plugins' screen in WordPress |
| 59 | + |
| 60 | +## Frequently Asked Questions |
| 61 | + |
| 62 | +### How do I deactivate/uninstall? |
| 63 | +Either rename or remove the Loginator plugin from `/wp-content/plugins/` |
| 64 | + |
| 65 | +## Screenshots |
| 66 | + |
| 67 | +1. Settings |
| 68 | +2. IDE |
| 69 | + |
| 70 | +## Changelog |
| 71 | + |
| 72 | +### 2.0.1 |
| 73 | + |
| 74 | +- **Added**: Emergency, alert, critical, error, warning, notice, info, debug, and success static methods |
| 75 | +- **Added**: Email on CRITICAL flag |
| 76 | +- **Added**: Pipe Dream logging |
| 77 | +- **Added**: Backwards compatibility with `loginator` function |
| 78 | +- **Integrated**: [Reusable Admin Panel](https://wordpress.org/plugins/reusable-admin-panel/) |
29 | 79 |
|
30 | | -## FAQ |
| 80 | +### 1.0.1 |
31 | 81 |
|
32 | | -### How do I deactivate/uninstall Loginator? |
| 82 | +- **Bugfix**: Added object handling to log the accessible non-static properties. |
| 83 | +- **Bugfix**: Line breaks and white space formatting |
33 | 84 |
|
34 | | -Because deactivation is disabled to protect your site from runtime errors, you'll need to manually remove or rename the plugin folder: |
| 85 | +### 1.0.0 |
35 | 86 |
|
36 | | -/wp-content/plugins/loginator/ |
| 87 | +- Initial Release |
0 commit comments