Skip to main content

Kollmorgen Support Network

WorkBench Logging | 05 Sep 2017 | |

WorkBench Logging

Debugging interaction problem between WorkBench and drives may be facilitated by using the built-in logging mechanism.

Where are the application and the log files in your system:

The easiest way to access the application or the log files is to open the About box in WB, it will give you the full path to the application and log folder:

image

WB has 2 log files:

  • WBApplication.log: the main log file, usually the one you want to look at.
  • WBCommunication.log: a log file specific to the communication between the user interface and the drive.

Configuring the log level:

By default, WB is installed with the ERROR level. It will only log errors or fatal errors, usually also signaled with the crash dialog box within WB.
For debugging purpose, you want to change the logging level so you can see more details about what is going on.
To change the logging level, you will have to edit the logging configuration file:

image

 

 

 

 

Use your preferred text editor to change the log level ate the end of this file:

image

WARNING:

  • Changing anything else in that file may end up with the logging mechanism not working anymore.
  • Changing any other configuration file may end up with WB not working properly anymore.
  • On Windows system with UAC activated, you may have to copy the WB.log4net file elsewhere to edit it and then copying it back to that particular place (saving in place will not work).

Logging levels:

The following levels are available:

  • ERROR
  • WARNING
  • INFO
  • DEBUG

It is recommended to start with INFO when searching for problems, DEBUG is really verbose.

Logging real time on the screen:

The log files are always generated with the configured log level. It is sometimes very interesting to look at them in real time to follow what is currently happening.
To achieve this goal, you can use any third party tool that will allow you to tail the log file on your screen.
For example, this small utility will provide that functionality:
https://www.baremetalsoft.com/baretail/
It is a small executable that you can launch and point to your log file. This particular versions allows you to colorize your log to help seeing important items you are looking at.

Logging sample (debugging the discovery on your network)

  1. Locate the application folder and your configuration file (WB.log4net)
  2. Copy the file on your desktop (if you have UAC activated)
  3. Change the log level from ERROR to INFO, save the changes
  4. Copy the file back in the config folder
  5. Launch Baretail
  6. Open your log file (WBApplication.log) [If WB has never been launched, no file will exist - launch it first]

You will see all operations logged on your screen:

image

In that particular sample, the 'Begin Discover' is colorized in yellow, it helps to see that start of each broadcast.
You can now see what happens while discovering:

  • How long we wait for answers (1600 ms)
  • How many devices are found and how much time they take to answer
  • How many devices were update with the second request (the first request only check for presence)
  • How it took to update all the devices

With these information you can know if your network is overloaded or slow.

About this Article

didier.kuttel