Troubleshooting using log files
You can enable logging for IBM Z Open Editor to produce detailed logs that can be used to troubleshoot problems by providing more information and a trace about the activities the editor is performing.
You can enable logging through a user preference setting called zopeneditor.logger
. In the VS Code Preferences editor, select from the allowed log levels: DEBUG
, INFO
(default), WARN
, ERROR
, and OFF
.
After logging is enabled, you can find the logging output in two places:
- In the VS Code Output panel, by selecting
IBM Z Open Editor
from the drop-down list. - A log file written to your disk that can be shared with technical support (if you are entitled to it) or attached to the issue you file against our public issues repository on GitHub. The first line in the VS Code Output panel will contain the absolute path to where the file is located on your system.
Use the log file for troubleshooting issues with the information provided. For example, when trying to understand why a specific include file was not found by the editor, the log file produced under the DEBUG
log level will give you a trace of the editor's activities for finding ZAPP files in your workspaces, the property groups it used, as well as in which locations it is looking. You can search in the log to see where an initial request for a specific file was made, the steps of processing the request, as well as any errors that were reported. Because the requests for all the include files in a program happen in parallel, each request will have a unique request ID that will help in distinguishing the concurrent events in the log.
Finding versions of all VS Code extensions installed
Enabling logging also provides information that technical support will be asking for. To retrieve it:
Ensure that your IBM Z Open Editor logger preference is set to
DEBUG
.In the
Output
console window, selectIBM Z Open Editor
from the drop-down list. The following information will be listed:- IBM Z Open Editor version
- Editor platform and version
- Editor Installation information
- Java SDK configuration location and memory allocation
- Key user settings
- Zowe Explorer VS Code Extension version
- Other VS Code Extensions visible
Locating VS Code extension and LSP log files on the local client
In addition to the Z Open Editor log file, there are other log files that can help with troubleshooting. For example, Zowe Explorer has implemented the same mechanism of selecting the log level from Settings, showing the content in the VS Code Output view, and writing it to a file that you can find by looking at the first line. Here a reference for where the extension and other relevant log files are typically located:
Log type | Location |
---|---|
Main log | The location is specified in output console window on 2nd line. ** The log file is available at...
|
Language Server Protocol (LSP) log | Find the line that begins with the following sentence to locate the LSP logs: ** ZLanguageServer: Will start a language server with command... Then, find the -data, tag which immediately precedes the LSP log file location.
|
Zowe Explorer log |
|
RSE API plug-in for Zowe CLI (RSE CLI plug-in) logs | Log files can be found in two locations:
|
Finding Zowe CLI version and RSE CLI plug-in version
In the VS Code Terminal window, enter the applicable commands:
- Command for Zowe CLI:
zowe --version
- Command for RSE CLI plug-in:
zowe plugins list
Log levels
IBM Z Open Editor uses the log levels described in the following chart. These levels are listed in order of most to least detailed (with the exception of OFF
, which turns off all logging). For example, the DEBUG
setting will output detailed debug information as well as messages from the other levels below it: INFO
, WARN
, and ERROR
. In contrast, the ERROR
setting will only log important errors.
Log level | Description |
---|---|
Debug | Identifies detailed informational events that are useful for troubleshooting the editor's behavior. |
Info | Provides informative messages that are of general interest to the end user for observing activities performed by the editor. |
Warn | Indicates potentially problematic situations that could cause unexpected behaviors or errors. |
Error | Designates error events that interrupted the editor in executing an operation as intended. |
Off | Nothing is logged. |