stream icon indicating copy to clipboard operation
stream copied to clipboard

Wonolog support?

Open strarsis opened this issue 6 years ago • 6 comments

Is support for Wonolog planned? This makes it much easier for plugins to log in a unified way.

strarsis avatar Nov 09 '19 18:11 strarsis

Thanks for opening the issue @strarsis! I hadn't seen Wonolog before -- it looks like a great tool.

I some way it is very similar to Stream in providing the logging functionality but it doesn't include the UI for the records and requires developers to setup the log points.

I really like the concept of context in Wonolog which supports an array of data instead of just the strings as in Stream.

What do you think would be the ideal integration for Wonolog? In theory, we could have a dedicated plugin that hooks into the Stream logger and just passes the data to Wonolog directly. Looks like we would need to add a hook in the log() method that other plugins could use to override or adjust the record store.

kasparsd avatar Nov 13 '19 12:11 kasparsd

@kasparsd: Yes, IMHO wonolog should be used as an internal, unified logging mechanism for core and plugins to be used, while plugins like Stream can additionally hook into wonolog and provide a UI, log storage mechanism and other features like email alerts and notification. The advantage is that new plugins just can use wonolog and don't need to handle different audit/logging plugins and versions and the audit/logging plugins automatically support all new plugins.

strarsis avatar Nov 13 '19 14:11 strarsis

Whatever the platform choice, I fully support the idea of "we need a unified logging platform".

lkraav avatar Nov 13 '19 14:11 lkraav

A notification API is proposed for WordPress core, the same would be needed/great for logging.

strarsis avatar Nov 13 '19 14:11 strarsis

Ha, and looks like I've advocated for Stream right there, back in 2016 https://make.wordpress.org/core/2016/10/03/feature-project-proposal-notifications-api/#comment-31197

But https://github.com/xwp/stream/issues/762 died.

lkraav avatar Nov 13 '19 14:11 lkraav

@lkraav: Maybe it will work this time using Wonolog. 😸

strarsis avatar Nov 13 '19 14:11 strarsis