I am developing a Plug-in to our Sensor products and am looking for a way to record the sensor’s state transitions to one of the XProtect Logs.
I know the user could generate a rule for each sensor’s point but that would be very labor intensive for them.
I’m currently doing my testing with an Essential+ 2018 system. Using the Component “Log Message To Server” example the Essential+ seems to support logging to the System & Audit Logs but I’m having no luck moving the example code to a plugin.
I have been unable to discover any example code in the SDK that demonstrates Logging from a plugin. Is it simply not supported?
That was the sample that I was trying to use as a template for implementing logging in a plugin even though it is part of the component integration samples. I am having problems getting it’s LogResourceHandler class to work as part of a plugin integration. When re-implemented in the plugin background it compiles and runs without errors but nothing is appearing in the logs.
I’m trying to do the logging from the background portion of the plugin.
The one portion of the sample code I am having problems when trying to implement the sample code in the plugin background is the user login. When I attempt to add the login portion of the sample to the plugin I can’t get the VideoOS.Platform.SDK classes recognized in the plugin. Is there some other plugin friendly class I should be using instead? I’m fully aware I won’t be able to use the UI portion of the sample from the plugin background. Is a login even required before being able to log? Am I going down an irrelevant path in trying to get the logging to work?
If I check the VideoOS.Platform.Log.LogClient.Initialized member it always returns false. What initializes it? Is it the VideoOS.Platform.SDK.Log.Environment.Initialize() call? What do I need to do to be able to use it in a plugin or is there a different plugin friendly function?
In the interest of full disclosure I’m a longtime C++ MFC developer and so am struggling somewhat with the C# & .Net. I’ve been finding the Milestone e-learning and samples very useful in getting everything else I needed to accomplish working. In part I want reassurance that it is possible to do what I am trying to do and I’m not going down some dead end.
I have discovered that this is not supported in the Smart Client environment, in fact it is only supported in standalone.
I will make a request to Milestone Product Management. Milestone Product Management will make prioritization etc., I cannot say when or if this will be implemented.
Rereading your question and my first answer I am sorry that I did not realize this was the case in first go, sorry.
While disappointing thank you for this information. It is better to know than to keep trying what isn’t possible. I will stay tuned for future SDK release announcements.