URL parameters#
The log viewer supports various URL parameters to control its behavior and state. The parameters are divided into two categories:
Search parameters (those which appear after
?).Hash parameters (those which appear after
#).
General rules#
Boolean values should use
true/falsestrings.If empty or falsy values are provided, the log-viewer will remove them from the URL on load.
Search parameters#
Search parameters appear after the ? in the URL. When the page loads, the viewer reads these
parameters to set its initial state.
Note
Modifying search parameters causes the page to reload.
Parameter |
Type |
Default |
Description |
Example |
|---|---|---|---|---|
|
String |
“” |
Specifies the log file to load on startup |
|
Below are some important details to be aware of when you’re working with search parameters.
A
filePathvalue can be a local file URL or remote HTTP(S) URL.If a
filePathvalue isn’t percent-encoded as per RFC 3986, it must be the last parameter in the URL, to prevent ambiguity with other log viewer search parameters. To include hash parameters in afilePathvalue, percent-encode the entire value.Relative
filePathvalues are automatically converted to absolute URLs, e.g.,http://localhost:3010/?filePath=/test/app.clp.zstdownloads the file fromhttp://localhost:3010/test/app.clp.zst.
Hash parameters#
Hash parameters appear after the # in the URL, and are used to control the log viewer’s state.
Note
Modifying hash parameters does NOT cause the page to reload.
Parameter |
Type |
Default |
Description |
Example |
|---|---|---|---|---|
|
Boolean |
false |
Enable/disable pretty printing of log content |
|
|
Number |
0 |
Navigate to a specific log event (1-based index) |
|
|
String |
“” |
Set KQL log filter for kv-pair IR logs |
|
|
String |
“” |
Set search query string |
|
|
Boolean |
false |
Enable/disable case-sensitive search |
|
|
Boolean |
false |
Enable/disable regular expression search |
|
|
Number |
-1 |
Navigate to the log event closest to the timestamp |
|
logEventNumis a 1-based index with a default value of0, indicating no specific log event is selected. When0, the log viewer loads the page containing the most recent log event.Moving the cursor in the editor automatically updates
logEventNumin the URL.Note
This behavior is under review and may be removed in future versions.
timestampvalues should be given as milliseconds since the Unix epoch, with a default value of-1. We don’t support negative timestamps.When both
logEventNumandtimestampare specified,timestamptakes precedence. We strongly recommend that you do not specify both parameters simultaneously.Timestamp navigation behavior:
If the log file contains one or more events with the specified timestamp, the viewer navigates to the matched log event that has the lowest index.
If no exact match exists, the viewer navigates to the log event closest to and before the specified timestamp, unless all log events are after the specified timestamp. In the latter case, the viewer navigates to the first log event.