K2 blackpearl Product Documentation: Installation and Configuration Guide
K2 Auditing and Logging

K2 Auditing and Logging

K2 blackpearl provides native logging framework and auditing features that enables administrators to monitor and troubleshoot the K2 blackpearl environment. System Event Logging is initiated automatically (default operation) from product installation and is active through to runtime. System auditing features are initiated manually by the developer per individual process at design time and leveraged during runtime.


The logging and auditing features of K2 blackpearl are built into the platform but operate and are configured in different ways.

Enable Logging

The steps described in this section will enable an administrator to enable logging, but without a full discussion of system requirements and possible implications. Be advised that the steps should only be pursued after reviewing the accompanying document or under the direction of a K2 Consultant.

Perform the following steps to enable HostServer Logging:

Open the following file in notepad:

[SystemDrive]:\Program Files\K2 blackpearl\Host Server\Bin\HostServerLogging.config

Find the following section:

Copy

<ApplicationLevelLogSettings>
  <ApplicationLevelLogSetting Scope="Default">
  <LogLocationSettings>
  <LogLocation Name="ConsoleExtension" Active="True" LogLevel="Info" />
  <LogLocation Name="FileExtension" Active="False" LogLevel="All" />
  <LogLocation Name="EventLogExtension" Active="False" LogLevel="Debug" />
  <LogLocation Name="ArchiveExtension" Active="False" LogLevel="Debug" />
  <LogLocation Name="MSMQExtension" Active="False" LogLevel="Debug" />
  </LogLocationSettings>
  </ApplicationLevelLogSetting>
</ApplicationLevelLogSettings>

               

Change the following line from:

Change
<add key="IncludeStackTrace" value="False" />
to
<add key="IncludeStackTrace" value="True" />

Change

<LogLocation Name="ConsoleExtension" Active="True" LogLevel="Info" />
to
<LogLocation Name="ConsoleExtension" Active="True" LogLevel="Debug" />

Change

<LogLocation Name="FileExtension" Active="False" LogLevel="All" />
to
<LogLocation Name="FileExtension" Active="True" LogLevel="All" />

Save and close the file

Restart the K2 service

By default the newly generated log file will be in the same directory as the modified config file. Alternatively verify the path in ‘LogFilePath’ setting in the config file. The log files will be in the [SystemDrive]:\Program Files\K2 blackpearl\Host Server\Bin\ directory

Perform the following steps to enable SmartObject Server Logging:

On all K2 Servers in the farm, you can enable detailed logging to help with SmartObject runtime debugging. To turn on the detailed logging, follow the below steps:

Open the following file in notepad:

                [SystemDrive]:\Program Files\K2 blackpearl\Host Server\Bin\K2HostServer.exe.config

Change:

Copy

<logging>
    <serviceauthentication log="no" path="C:\Program Files (x86)\K2 blackpearl\ServiceBroker\Logs\serviceauth.log" overwrite="no" />
    <timestamping log="no" path="C:\Program Files (x86)\K2 blackpearl\ServiceBroker\Logs\timestamp.log" overwrite="no" />
    <brokerpackagein log="no" path="C:\Program Files (x86)\K2 blackpearl\ServiceBroker\Logs\brokerpackagein.log" overwrite="no" />
    <brokerpackageout log="no" path="C:\Program Files (x86)\K2 blackpearl\ServiceBroker\Logs\brokerpackageout.log" overwrite="no" />
    <servicepackagein log="no" path="C:\Program Files (x86)\K2 blackpearl\ServiceBroker\Logs\servicepackagein.log" overwrite="no" />
    <servicepackageout log="no" path="C:\Program Files (x86)\K2 blackpearl\ServiceBroker\Logs\servicepackageout.log" overwrite="no" />
</logging>

To:

Copy

<logging>
    <serviceauthentication log="no" path="C:\Program Files (x86)\K2 blackpearl\ServiceBroker\Logs\serviceauth.log" overwrite="no" />
    <timestamping log="no" path="C:\Program Files (x86)\K2 blackpearl\ServiceBroker\Logs\timestamp.log" overwrite="no" />
    <brokerpackagein log="yes" path="C:\Program Files (x86)\K2 blackpearl\ServiceBroker\Logs\brokerpackagein.log" overwrite="no" />
    <brokerpackageout log="yes" path="C:\Program Files (x86)\K2 blackpearl\ServiceBroker\Logs\brokerpackageout.log" overwrite="no" />
    <servicepackagein log="yes" path="C:\Program Files (x86)\K2 blackpearl\ServiceBroker\Logs\servicepackagein.log" overwrite="no" />
    <servicepackageout log="yes" path="C:\Program Files (x86)\K2 blackpearl\ServiceBroker\Logs\servicepackageout.log" overwrite="no" />
</logging>

Save your changes to the config file.

Restart the K2HostServer service

The log files will be created in the ‘path’ attribute for each setting.

Advanced Information:

For additional information regarding Auditing and Logging read the K2 blackpearl Logging and Auditing white paper. 

 

 


K2 blackpearl Product Documentation: Installation and Configuration Guide 4.6.11