Skip to content

Commit b071b79

Browse files
author
Poly Plugins
committed
Added: Emergency, alert, critical, error, warning, notice, info, debug, and success static methods
Added: Email on CRITICAL flag Added: Pipe Dream logging Added: Backwards compatibility with loginator function Integrated: [Reusable Admin Panel](https://wordpress.org/plugins/reusable-admin-panel/)
1 parent 491561a commit b071b79

File tree

5 files changed

+704
-177
lines changed

5 files changed

+704
-177
lines changed

README.MD

Lines changed: 73 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,87 @@
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.
13

4+
## Demo
5+
[![YouTube Video](https://img.youtube.com/vi/k1o4zZC6dzs/maxresdefault.jpg)](https://youtu.be/k1o4zZC6dzs)
26

3-
[![Loginator Demo](https://img.youtube.com/vi/k1o4zZC6dzs/0.jpg)](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.
49

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
611

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+
```
815

9-
## Features
16+
### Static Method Examples
1017

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+
```
1829

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
2353

2454
## Installation
2555

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/)
2979

30-
## FAQ
80+
### 1.0.1
3181

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
3384

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
3586

36-
/wp-content/plugins/loginator/
87+
- Initial Release

css/style.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* DO NOT CHANGE THIS FILE
3+
* You can overwrite this via $this->config. Put a stylesheet somewhere in your plugin folder and link to it via the css key.
4+
* Example: $this->config = array('css' => '/css/settings.css');
5+
* This will also allow you to extend the settings class with custom css if you want to change more than colors, this way you aren't overwritting the settings class for all plugins using it.
6+
* This will dequeue colors.css and replace it with your custom css file, so you will need to copy the below css to your new file to change the colors.
7+
*/
8+
:root {
9+
--settings-primary: #ffcf38;
10+
--settings-secondary: #333;
11+
--settings-bg: #fff;
12+
--settings-fields-bg: #fff;
13+
--settings-validation-bg: #ff0000;
14+
--settings-border: #e2e2e2;
15+
}

img/logo.png

6.02 KB
Loading

0 commit comments

Comments
 (0)