We noticed that calls to VideoOS.Platform.Log.LogClient (Instance.AuditEntry) will not register if they are sent from a Event Server background service plugin and they will silently fail. They will work however if sent from a Management Client plugin or Smart Client plugin.
How to reproduce:
Use the LogOnServer code from ComponentSamples to trigger the CardSwiped() method from LogResourceHandler from inside a ES background plugin and from a MC/SC plugin.
Milestone version: 2024 R2
@Eric Bourque
I did the same test you describe. I was able to make the same observations. I will have Milestone Development help in further investigation. (I did a mistake when first testing.)
For me it works. Can you please double-check if the plugin is loaded, and you have moved the code correctly.
I am attaching a modified EventTracer sample so you can see what I used in my testing.
PS. I tested with 2025R2.
@Bo Ellegård Andersen (Milestone Systems) - I just bumped into this question by chance since I’m just working with audit logging from an event server plugin. I’m making a complicated approach to this by creating a separate process acting as a standalone integration (see my post about ManualMipTokenCache).
The reason was that it was clear in the documentation (LogClient) that LogClient wasn’t supported from event server plugin:
“Currently only supported in standalone and Management Client environment.”
Could you confirm that the documentation is outdated and that LogClient is officially supported directly from a EventServer plugin before I abandon my approach.
Thank you for making us aware what the documentation says about this functionality.
I tested with the modified plugin sample in Event Server, Smart Client and Management Client and it works. I also added code from the LogRead sample to see if there might be limitation on read. This also worked in all the environments.
I will now ask Milestone Development to make a correction the documentation.
modified EventTracer sample
Hi Bo,
I found out whats going on thanks to your sample.
It works from Event Server only if you do LogResourceHandler.RegisterMyMessages() from the ES background plugin. I was doing it in the PluginDefinition class on Init() after adding the client plugins (Admin and SC). For those it works like that, but it appears that ES needs it explicitly in it’s BGP class.
You can test by moving RegisterMyMessages() from the ES to PluginDefinition in your sample.
2024R2
Hi Andrei,
It is a known issue that if you put something in PluginDefinition Init() it might execute before the Event Server is ready, in this case I would assume the audit log client embedded in the Event Server hasn’t started yet. So, take care what you use PluginDefinition Init() for.