Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


Mayank Goyel
2010-06-10T15:52:20Z
Hi,

I have 3 queries related to Visual Cron API.

1. What is the difference ebtween Server logs and Client logs. There is one option of filtering the logs based on Source(Client/Server). At my machine, there is no log present for CLient source. Could you please let me know when it occurs?

2. I need to fetch all server logs from one of my C#. Net Application and displays some of their details. Could you please give a code snippet to go ahead?


3. Also please explain "LogToFile" property usage.

Thanks.
Sponsor
Forum information
Support
2010-07-14T11:32:52Z
Sorry for the late response.

1. Client log are events raised by the Client. Those are very few and often we just add some small events for debugging. What is important are the Server events which are connected to the Tasks.

2. Right now we only store about 2000 entries and focus on real time logging. For real time logging you just need to add the log handler.

VB.NET

Quote:

AddHandler Log.LogAddedStatic, AddressOf AddLog



C#

Quote:

Log.LogAddedStatic+=new Log.DelegateLogAdded(Log_LogAddedStatic);



Here is some VB.NET code to retrieve the historic values. This code might change soon as we plan to add more history.

Quote:

Dim lic As New LogInfoClass
Try
lic.LogStart = DirectCast(cboLogDates.SelectedValue, Date)
Catch ex As Exception
LogAPI.Log(LogClass.EventT.Err, "RequestLogs (1), ex: " & ex.Message, String.Empty, String.Empty)
End Try

Try
lic.LogStartId = ConnectionAPI.CurrentServer.Log.FirstServerIdAtClient
Catch ex As Exception
LogAPI.Log(LogClass.EventT.Err, "RequestLogs (2), ex: " & ex.Message, String.Empty, String.Empty)
End Try

Try
ConnectionAPI.CurrentServer.Log.SendLogChunkRequest(lic)
Catch ex As Exception
LogAPI.Log(LogClass.EventT.Err, "RequestLogs (3), ex: " & ex.Message, String.Empty, String.Empty)
End Try



When doing this the result will come in the Log.LogArrayAddedStatic event so you need to add that handler too.

3. This just add file debugging for the API. You are not intersted in getting this kind of data from the API.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top