The Operator Logbook is a collection of workspaces that receive error messages from G2's default error handler. The Operator Logbook appears as a set of pages, each of which can contain one or more error and informational messages produced by G2.
![]() |
Note: Operator Logbook messages are internal to G2, rather than being posted by the user, and therefore are not included in the values of expressions such as the count of each message.
Hiding and Showing Logbook Pages
The G2-WINDOW class includes the Show-operator-logbook-in-this-window? attribute, whose value is yes (the default) or no. Leaving the value of this attribute as yes causes the Operator Logbook to be displayed as specified in the Logbook Parameters system table. no for a window hides all existing Operator Logbook pages in that window. Subsequent messages are recorded in the logbook, but all pages remain hidden. Changing the value to yes again shows logbook pages as specified in the Logbook Parameters system table. The pages look as they would if they had never been hidden.
To hide and show operator logbook pages:
Edit the window's table or use the conclude action to set the Show-operator-logbook-in-this-window? attribute of the relevant G2 window to yes (to display pages) or no (to hide them).
g2-window for the user kmm:
![]() |
Limiting the Number and Size of Logbook Pages
You can conserve G2's use of memory (specifically, its region 1 memory) by keeping fewer Operator Logbook pages in memory, and by limiting the number of logbook messages allowed per page. The number of Operator Logbook pages can quickly accumulate, because G2 automatically writes a message to the Operator Logbook workspace each time you start, pause, or reset the current KB.
To limit the number of Operator Logbook pages:
Set the Maximum-number-of-pages-to-keep-in-memory attribute in the Logbook Parameters system table to a small number, such as 4 or 5.
To limit the size of Operator Logbook pages:
Set the Width-for-pages and Height-for-pages attributes in the Logbook Parameters system table.
go to referenced item menu choice. Selecting go to referenced item causes G2 to display the workspace that contains the item referenced in the message, and displays the referenced item (shown within its own workspace) in the center of the window that G2 is displaying.
go to referenced item menu choice appears only if the Operator Logbook message references an item on a workspace that is not configured to be proprietary. Chapter 47, Package Preparation describes proprietary workspaces.
For example, before selecting
go to referenced item, your window might appear like this:
![]() |
After selecting
go to referenced item, G2 displays the referenced action button at the center of the window, as shown in the next figure:
![]() |
Use the go to referenced item menu choice with care. As shown above, G2 relocates the referenced item's parent workspace so that the item appears at the center of the window. (This might disrupt the visual organization of a KB whose workspaces have been carefully positioned.) G2 also displays that item's parent workspace at its full scale, as described under Scaling a Workspace.
Note: A message placed on the Operator Logbook by an inform action does not display the go to referenced item menu choice.
If you select an Operator Logbook message that references more than one item, the go to referenced item menu choice leads to a submenu, from which you can choose a particular item, as shown in the next figure:
![]() |
If an Operator Logbook message does not refer to an item, G2 does not offer the
go to referenced item menu choice in the message's menu, as shown in the next figure:
![]() |
Shadowing the Operator Logbook Message Handler
When G2 posts a message to the Operator Logbook, it does so by calling an Operator Logbook message handler and passing it the message. The system-defined handler posts the message to the logbook.text. Such a procedure is called a user-defined Operator Logbook message handler. Once registered, such a handler receives all messages that would otherwise go to the system-defined handler and be posted to the Operator Logbook. Such messages do not appear on the logbook, and are not recorded in the log file (if any).
Note: The following procedures provide low-level operator logbook message handling. More sophisticated techniques are available through GFR. See the G2 Foundation Resources User's Guide for details.
To register a logbook message handler:
g2-register-logbook-message-handler
(procedure: class procedure)
To deregister a logbook message handler:
g2-deregister-logbook-message-handler ( )
To get the logbook message handler:
g2-get-logbook-message-handler ( ) -> {handler: class procedure | false: truth-value}
false if none is registered.