Skip to end of banner
Go to start of banner

How to enable and locate BVMS SDK Scriplet Logging?

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 5 Next »

Article status

EXTERNAL  

Link to be provided outside of Bosch

Related Products:
BVMS SDK, BVMS 


Overview:

BVMS Scriptlets can be debugged via logging to a logger file or messaging to the Operator workstation.

This article describes how to enable BVMS Scriplet logging.

You can log to the Server Script log or the Client Script log. Logs are default send to C:\ProgramData\Bosch\VMS\Log

Step-by-step guide


1.Creating Log files


  • ClientScriptLogger – automatically created

  • Creates file “ClientScriptLog.txt”
  • ServerScriptLogger - automatically created

  • Creates file “ServerScriptLog.txt”


2.Log information to the log files


There are 3 methods to log information:

  • Log Info
  • Log Error
  • Log Debug


Examples:

[Scriptlet("59c4d66e-9395-4dcc-8d27-90dc2b7a00c4")]

public void DemoLogger()

{

//use refence:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

MessageBox.Show("Hello World");

Logger.Info("Hello World script started");

Logger.Error("Hello World script started");

Logger.Debug("Hello World script started"); // Not writing to ClientScriptLog.txt !

}


3.Logging Location - C:\ProgramData\Bosch\VMS\Log. The logs are automatically collected by the BVMS Configuration Collection Tool.

4.Changing the location of the BVMS Scriplet Logging.


  • Server Scripts :

Logging Directory can be found in the file:

C:\Program Files (x86)\Bosch\VMS\AppData\Server\CentralServer\BvmsLogCfg.xml

and is defined by the ServerScriptLogAppender path:

Default:

</appender>

<appender name="ServerScriptLogAppender" type="Bosch.Vms.Shared.Logging.Imp.RollingFileAppender, Bosch.Vms.Shared.Logging.Imp">

<file value="%CommonApplicationData%\\Bosch\\VMS\\Log\\ServerScriptLog.txt"/>


  • Client Scripts :

Logging Directory can be found in the file:

C:\Program Files (x86)\Bosch\VMS\AppData\Client\OpClient\ApplicationWiring\Nvr\LogCfg.xml

and is defined by the ClientScriptLogAppender path:

Default:

</appender>

<appender name=“ClientScriptLogAppender" type="Bosch.Vms.Shared.Logging.Imp.RollingFileAppender, Bosch.Vms.Shared.Logging.Imp">

<file value="%CommonApplicationData%\\Bosch\\VMS\\Log\\ClientScriptLog.txt"/>

  • No labels