Enabling WEBfactory 2010 Communication Server (WCS) logging
Check out this article and learn how to enable WE#Bfactory 2010 Communication Server WCS logging.
Setting up WEBfactory 2010 Communication Server (WCS) logging with Activity Analyzer
The procedure of enabling WCS logging takes place in the WEBfactory 2010Activity Analyzer. The Activity Analyzer allows the logs to be displayed in real time and also to be saved on the hard drive as files.
In order to enable WCS logging, open the WEBfactory 2010Activity Analyzer and select Options from the menu bar.
As it can be easily seen in the above picture, the Event Log writer is enabled. This means that WEBfactory 2010 is logging the events.
To enable file writing of the logs, select the second tab in the Options window of the Activity Analyzer, and select Enable file writer.
Now we need to define a path where the Activity Analyzer should save the log files:
Create a folder on your hard drive and make it Write enabled.
In the Activity Analyzer Options window, go to Trace logs path and select the new folder.
Set the Max. trace fog files option and the Max trace log entries option. This options let the user control the number and size of the log files.
The Max. trace log files sets the number of log files to be stored. In our example, there can be 10 log files. When the 11th file is created, the oldest file from the existing 10 files will be deleted.
The amount of trace log entries per file is defined as Max. trace log entries divided by Max. trace log files.
In order to log the WCS, we need to specify the Channel ID for the WCS.
In the Advanced filter section of the Options window, select to create a new filter.
Type the Channel ID WCS:process-id. The wildcard * in the Message topic means that all the messages will be logged.
In the Message level, click on the tree dots button and select what level of messages you would like to log.
Click Save to save the configuration and select a place for the xml config file.
Select Ok to confirm the settings.
Manual WCS logging setup
The manual setup procedure is not recommended unless the system encounters security errors while using the Activity Analyzer.
In order to ensure the safety of the system, it is strongly suggested to back-up the registry before proceeding.
Click to download the required files for this setup: WCS.zip
Back-up the registry, using a back-up tool.
Stop the WEBfactory 2010 Server and all OPC Servers.
In the Task Manager, stop the WTS and WCS processes.
Download and extract the WCS archive.
Copy the extracted files to the folder C:\Program Files (x86)\WEBfactory 2010 \Server.
Create a folder for logs storage (C:\MyLog).
Set the settings at the registry:
In the Registry Editor, navigate to HKEY_LOCAL_MACHINE/SOFTWARE/Wow6432Node/WEBfactory 2010 /WTS/1.0/LoggerKeys. Under the LoggerKeys there should exist a key named FileWriter. If the key is missing, create it.
The FileWriter key must contain the entries:
Name
Type
Date
Active
REG_DWORD
0x00000001 (1)
LogFilter
REG_SZ
WCS*&*&FFFFFFFF (read/write) or WCS*&*&8004 (write only)
LogMaxCompleteSize
REG_DWORD
0x0FFFFFFF (268435455)
LogMaxFileCount
REG_DWORD
0x00000004 (4)
LogPathName
REG_SZ
C:\MyLog
Go to HKEY_LOCAL_MACHINE/SOFTWARE/Wow6432Node/WEBfactory 2010 /WCS. Under the WCS should be a key named 1.0. If the key doesn't exist, create it. The key should look like this:
Name
Type
Data
MessageLevelMask
REG_DWORD
0xffffffff (4294967295)
WebClientTimeout
REG_DWORD
0x000493e0 (300000)
The folder where the logs will be saved is C:\MyLog:
Start the services: WEBfactory 2010 Communication Service, WEBfactory 2010 Trace Server, WEBfactor 2010 Server and the OPC servers.
The log file was created.
LogFilter Functions and Flags
Function | Meaning | Flag ( bitmask) |
WTSLIB_MESSAGE_LEVEL_DEBUG_ON_WRITE_ASYNC_REQ | OnWriteAsyncRequest event on server interface | ((1 << 3) | (1 << 12)) |
WTSLIB_MESSAGE_LEVEL_DEBUG_READ | ReadSignals on client interface and webservice interface | ((1 << 3) | (1 << 13)) |
WTSLIB_MESSAGE_LEVEL_DEBUG_ONUPDATE | OnSignalUpdates event on client interface | ((1 << 3) | (1 << 14)) |
WTSLIB_MESSAGE_LEVEL_DEBUG_WRITE | WriteSignals on client and webservice interfaces, UpdateSignals on server interface | ((1 << 3) | (1 << 15)) |
WTSLIB_MESSAGE_LEVEL_DEBUG_IO | ((1 << 3) | (1 << 16)) | |
WTSLIB_MESSAGE_LEVEL_DEBUG_IFACE | Entry and leaving on all interface methods, including events | ((1 << 3) | (1 << 17)) |
WTSLIB_MESSAGE_LEVEL_DEBUG_THREADING | ((1 << 3) | (1 << 18)) | |
WTSLIB_MESSAGE_LEVEL_DEBUG_WATCHDOG | watchdog for webservice interface | ((1 << 3) | (1 << 19)) |
WTSLIB_MESSAGE_LEVEL_INFO | Information | (1 << 2) |
WTSLIB_MESSAGE_LEVEL_WARNING | Warning | (1 << 1) |
WTSLIB_MESSAGE_LEVEL_ERROR | Error | (1 << 0) |