Article
· 17 hr ago 2m read

VSCode Extension for Visual Parsing of ISCLOGs

ISCLOGs are a useful debugging tool provided with IRIS that can help you troubleshoot many different issues. For more information about creating these logs, please see the following IRIS documentation: "Logging".

This log is written to the ^ISCLOG global stored in the %SYS namespace. Each global node is a separate event, with additional information sometimes logged to the subnode.

Each entry consists of a list containing the following fields: ID, Category, LogLevel, Message, Namespace, Process ID, Routine, SessionID, Tag, and, TimeAdded. For more details about the different fields, please refer to the "Fields in the Log" section in the IRIS documentation.

While this tool provides valuable information, it also generates many entries and can be difficult to interpret. To help with that, I created a VSCode extension that improves readability in two ways:

1) By exporting an ISLOG to VSCode, you can use built-in VSCode features like file compare.

2) The utility includes syntactic highlighting to make it easier to identify different fields.

Installation:

  1. In VSCode, search for the extension "Pretty ISCLOGs" or use the following link: https://marketplace.visualstudio.com/items?itemName=tchismar.pretty-isclogs
  2. Select the install button to load the extension
  3. Follow the steps below to export and view an ISLOG

Usage:

  1. In the ObjectScript Shell, navigate to the "%SYS" namespace.
  2. Run the following command to specify a filename – you can use any filename as long as it has the ".isclog" extension

set file = <filepath>/filename.isclog

ie: set file="C:/ISCLOGs/myISCLOG.isclog"

  1. Run the following command to export your ISCLOG global to the file:

Open file: "wns" use file zw ^ISCLOG close file

  1. Open the file with VSCode to view the log

Here is an example screenshot using InterSystems Default Dark Modern color theme:

Limitations:

Due to changes in ISCLOGs' storage, this utility will only work with more recent releases (Generally, IRIS releases from 2018 and later).

I've tested this using the themes provided in the InterSystems ObjectScript Extension. The utility uses VSCode's token colors. The exact colors used are set by whichever theme you've applied, so readability may vary depending on your theme.

Discussion (5)3
Log in or sign up to continue