Enabling Chat Logging – Sametime 8.5.2 Server

Over time I have had several requests from managers to pull Sametime chat logs. Unfortunately unless the user was saving the chat logs to their local client and not deleting them I didn’t have anything setup server side to address this issue. I found several technotes and documents from IBM on enabling server side chat logging and I opened a PMR just to be sure that I understood everything correctly. Here is how I configured server side chat logging on my IBM i. (Sidenote: many of the chat logs are between 1kb and 50kb, in our organization with an average of 180 people that’s about 400-500 logs a day. Consider where to store these logs carefully if you have a much bigger organization).

Technote #1424677: How to enable Chat Logging on the Sametime 8.5 server
Steps to enable ChatLogging on a Sametime 8.5.2 running on IBM i. (screenshots and steps courtesy of IBM support with some injection of my own notes)

Step 1: Updating the sametime.ini and creating the chatlogging.ini

a. Set ST_CHAT_LOG to have a value of “File” in the sametime.ini file under the ST_BB_NAMES section.

For IBM i : To use stchatlogf.srvpgm as the chat logging blackbox, set


b. Create chatlogging.ini in the same directory as sametime.ini.

EDTF ‘/sametime770/data/chatlogging.ini’

c. Move all the attributes from sametime.ini related to [ChatLogging] to chatlogging.ini.

This doesn’t exist in the sametime.ini by default on IBM i, so I copy/pasted from the technote. Make sure line 3 contains the complete string.

CL_CHAT_START_DISCLAIMER_RICH_TEXT=<span style=”color:#ff0000; font-size:11pt;font-family:Tahoma;”><b><i>Rich Text Disclaimer message.</i></b></span>


d. Make sure to add new folder CLData under the Sametime data folder

CRTDIR ‘/sametime770/data/CLData’

I changed the ownership of the chatlogging.ini and CLData directory created.

CHGOWN ‘/sametime770/data/CLData’ QNOTES
CHGOWN ‘/sametime770/data/chatlogging.ini’ QNOTES

Step 2: Updating the stconfig.nsf database

This test server is not registered to a Sametime System Console, so we make the updates from the stconfig.nsf database.

Using a Notes client to access stconfig.nsf

If you have configured Sametime 8.5 without the Sametime System Console, perform these steps:
1. Stop the Sametime 8.5 server. Refer to the technote titled, “Shutting down a Sametime server without shutting down the Domino server” (#1088677).
2. Use a Lotus Notes client to open the Sametime Configuration database (stconfig.nsf) on the Sametime server.
3. In the right hand pane, open the CommunityServices document by double-clicking on the date associated with the document.
4. Double-click on the CommunityServices document to put the document in edit mode.
5. For the “Chat Logging Flag” parameter, select either “relax” or “strict” for the chat logging mode.
6. Update the ” Capture Service Type” parameter.
If you selected “strict” as the chat logging mode, enter the value “0x1000” (e.g., Capture Service Type = 0x1000). If you selected “relax” mode, enter Capture Service Type = 0.

On IBM i, we set it to “relax”:
Alternate Step 2: If you have the Sametime System Console installed follow these steps:
1. Log in to the Integrated Solutions Console.
2. Click Sametime System Console > Sametime Servers > Sametime Community Servers.
3. In the Sametime Community Servers list, click the deployment name of the server with the connectivity information that you want to change.
4. Click the Community Services tab.
5. In the Server Features section, under Enable chat logging, select one of the following choices:
Always (If you pick “Always”,  if the chat logging is not available or broken then users can’t chat in the clients at all.)
When available (If you pick “When Available”, then users can chat in the client even if chat logging not working.)
6. Click OK
7. Restart the Lotus Sametime Community Server for settings to take effect.

After starting the Sametime server back up, “load staddin2”, I used the following users to test the chat logging.


Reviewing the CLData directory I see a new file created (IM_6_03_Dec_13,_22_50_33.dat):
I ftp’ed the data to my workstations, but the file is in an ASCII formate. Below are the contents to review as an example.

03/Dec/13, 22:50:33: Session IM_6 started for organization
03/Dec/13, 22:50:33: Add UserId CN=Test User3,O=TEST
03/Dec/13, 22:50:33: Add UserId CN=Test User1,O=TEST
03/Dec/13, 22:50:42: Send Message from UserId CN=Test User1,O=TEST to UserId CN=Test User3,O=TEST msgLen: 98 msg: <span style=”font-size:10pt;font-family:Arial;color:#000000;” class=”left”>Hello Test User3</span>
03/Dec/13, 22:51:01: Send Message from UserId CN=Test User3,O=TEST to UserId CN=Test User1,O=TEST msgLen: 101 msg: <span style=”font-size:10pt;font-family:Arial;color:#000000;” class=”left”>Hi Back Test User 1</span>

Notes courtesy of IBM: Chat Logging is most beneficial when used with a 3rd party applications. A quick google search for “Sametime Chat Logging” will identify some popular products. But if all you need is the raw data, the steps above will log chat details to.dat/text files on the system. Besides the date, the file names are not very helpful in identifying the chat participants. This makes managing this data without a 3rd party application very difficult.

*******My Opinion*******
It would be nice if IBM had a tool to view these instead of having to purchase a 3rd party tool. Seems like viewing “text files” would be an easy thing for IBM create a database or view for us to interact with them. Furthermore, why isn’t there a sametime.ini setting to purge chat logs after a certain date?
*******End My Opinion*******

Here are some helpful links regarding Sametime Chat Logging.
Sametime Wiki: New features of IBM Lotus Sametime 8.x chat logging and how to extend its SDK
Administering Sametime Standard: Enabling Local Chat Logging