Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Seravo Plugin logger #609

Open
JoosuaKoskinen opened this issue Aug 10, 2021 · 1 comment
Open

Add Seravo Plugin logger #609

JoosuaKoskinen opened this issue Aug 10, 2021 · 1 comment

Comments

@JoosuaKoskinen
Copy link
Contributor

Is your feature request related to a problem? Please describe.

We currently have a lot of error_log in the code and the message always looks different. The message often doesn't tell anything about what function it was printed from:
[09-Aug-2021 10:56:55 UTC] SWD API () error 401:

Describe the solution you'd like

We could have a simple Logger::error_log($message) which would prefix the messages with [Seravo Plugin] or something. Also if SERAVO_PLUGIN_DEBUG mode is enabled, it could automatically add a stack trace.

Often before version releases, I loop trough sites and grep php-error.logs to see if the previous version had some issues we havent fixed. Some unified string in the log messages (like [Seravo Plugin] prefix) would make finding Seravo Plugin errors much easier.

What do you think @Moppa5?

@Moppa5
Copy link
Contributor

Moppa5 commented Aug 10, 2021

@JoosuaKoskinen, Absolutely! This would do a great job with the unifying style as well. In general, I think all this kind of repetition should be trivial, like on this instance logging an api error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants