How to get all contents of log?

I would like to get all contents of log, audit, system and rule logs.

I have found an adequate function " VideoOS.Platform.Log.LogClient.ReadLog".

Unfortunately, when we use the “VideoOS.Platform.Log.LogClient.ReadLog”, we get only seven items.

Seven Items.

“Time”, “Severity”, “Message”, “ObjectId”, “ObjectName”, “UserId”, “UserLocation”

Could you tell me how to get all contents of these logs?

I have experimented with this. Please try my sample.

http://download.milestonesys.com/MIPSDK/Samples/LogRead.zip

You need to check the references to the Milestone dlls and copy the dependent files to the project, nothing else is required to build and run this sample. Feedback on the sample will be appreciated.

Bo, thanks for the quick reply.

I run this sample.

But this samples get only seven Items,too.

I want to get other Items.

For Example, The Audit Log’s Items are “Category” ,“Permission”,“ID” and “Resource type”.

Is any other way to get those items?

You are right. I did not catch that my sample also shows the issue as you have described it.

Milestone Development has now put it on the wishlist to enhance the ReadLog function to include the fields seen in the Management Client.

Thank you for putting on wishlist.

I wish that the ReadLog comes to be able to get more items.

I am happy to announce that in MIP SDK 2017R2 you will be able to get the items.

I hope you agree that Milestone Development did a fast job of making the wish a reality.

MIP SDK 2017R2 is planned to release this summer.

Thank you for your announce.

Oh,That is good!!

If MIP SDK 2017R2 is released ,I will check to be able to get the items.

Can I implement this sample in XProtect Corporate via a plugin?

VideoOS.Platform.Log.LogClient.ReadLog is only implemented in the standalone environment and will not work in a plugin.

This is an old thread, but I have a question regarding the logs. I tried to implement VideoOS.Platform.Log.LogClient.GetCount to get count of all logs between certain dates. My program pretty much stalls and nothing happens when it get to this point. As there is a limit of 999 logs per page, is there a way to actually get the number of pages rather than log count ?

Yes, there is a limit on 999 on ReadLog (where it is documented) and also on GetCount method (this information is missing in documentation).

Ref. https://doc.developer.milestonesys.com/html/index.html?base=miphelp/class_video_o_s_1_1_platform_1_1_log_1_1_log_client.html&tree=tree_search.html?search=logclient

A possible workaround is to split the time period asking for information from a smaller time period.

Thanks Rie, I tried smaller time period (1 day) but everytime I try to use GetCount method, my program just hangs. Any resolution you can think of? What does “page” parameter for, is 999 limit per page ? I was hoping GetCount divided by 999 would be total pages.

I misunderstood the situation but now I tested. In my test the GetCount method hangs even with the smallest time interval.

I will report this observation to Milestone Development for an investigation.