Auditing and Logging in K2 blackpearl
DOWNLOAD FILE DOWNLOAD
KB000298
PRODUCTK2 blackpearl
SEE ALSO KB000185: How to add a 3rd party server to the Event Bus
LEGACY/ARCHIVED CONTENT
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.
For K2 Five customers, please see the KB article topic KB003293: Auditing and Logging in K2 Five.
Introduction
K2 blackpearl provides a logging framework and auditing features that enable you to monitor and troubleshoot your K2 blackpearl environment. System event logging happens automatically at installation and is active through runtime. System auditing features must be configured manually at workflow design time for runtime information to get recorded.
The logging and auditing features of K2 blackpearl are built in to the platform but operate and are configured in different ways. This whitepaper discusses each feature in detail.
Key areas discussed:
-
System
-
Level of integration
-
Extensibility
-
Configuration
-
How to leverage and make use of the system event logs and audit capability
Enable HostServer 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.
The steps required to enable server logging are described below.
-
Open the following file in notepad:
eInstallDrive]:Program Files (x86)K2 blackpearlHost ServerBinHostServerLogging.config
-
Find the following section:
<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:
<LogLocation Name="FileExtension" Active="False" LogLevel="All" />
to
<LogLocation Name="FileExtension" Active="True" LogLevel="All" /> -
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" />
-
Save and close the file
-
Restart the K2 server
By default, the newly-generated log file is located in the same directory as the modified config file. Alternatively, you can change the value for the ‘LogFilePath’ setting in the config file.
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 this logging, follow the steps below:
With the release of K2 4.6.9 the SourceCode.SmartObjects.Runtime.config has been consolidated into a single configuration file called K2HostServer.exe.Config file, which is located in the K2 blackpearlHost ServerBin folder on the K2 Server. The connection strings previously stored in these files are now retrieved from the K2HostServer.exe.Config file.
-
-
Open >InstallDrive]:Program Files (x86)K2 blackpearlHost ServerBinK2HostServer.exe.config file with a text editor
-
Change the no values to yes values for the last four lines in the <logging> section, and keep your actual path to these files the same (unless you want them in a different location). The default configuration:
<logging>
<serviceauthentication log="no" path="%ProgramFiles%K2 blackpearlServiceBrokerLogsserviceauth.log" overwrite="no" />
<timestamping log="no" path="%ProgramFiles%K2 blackpearlServiceBrokerLogs imestamp.log" overwrite="no" />
<brokerpackagein log="no" path="%ProgramFiles%K2 blackpearlServiceBrokerLogsrokerpackagein.log" overwrite="no" />
<brokerpackageout log="no" path="%ProgramFiles%K2 blackpearlServiceBrokerLogsrokerpackageout.log" overwrite="no" />
<servicepackagein log="no" path="%ProgramFiles%K2 blackpearlServiceBrokerLogsservicepackagein.log" overwrite="no" />
<servicepackageout log="no" path="%ProgramFiles%K2 blackpearlServiceBrokerLogsservicepackageout.log" overwrite="no" />
</logging>The configuration to enable SmartObject logging:
<logging>
<serviceauthentication log="no" path="%ProgramFiles%K2 blackpearlServiceBrokerLogsserviceauth.log" overwrite="no" />
<timestamping log="no" path="%ProgramFiles%K2 blackpearlServiceBrokerLogs imestamp.log" overwrite="no" />
<brokerpackagein log="yes" path="%ProgramFiles%K2 blackpearlServiceBrokerLogsrokerpackagein.log" overwrite="no" />
<brokerpackageout log="yes" path="%ProgramFiles%K2 blackpearlServiceBrokerLogsrokerpackageout.log" overwrite="no" />
<servicepackagein log="yes" path="%ProgramFiles%K2 blackpearlServiceBrokerLogsservicepackagein.log" overwrite="no" />
<servicepackageout log="yes" path="%ProgramFiles%K2 blackpearlServiceBrokerLogsservicepackageout.log" overwrite="no" />
</logging> -
Save your changes to the config file.
-
Restart the K2 server
The log files are created in the ‘path’ attribute for each setting.
-