Logs¶
Log cmdlets provide read-only access to JIM's structured service logs (Web, Worker, Scheduler), with filtering by service, date, level, and search text. Useful for remote troubleshooting without needing container/host access.
Get-JIMLogEntry¶
Gets log entries, with optional filtering. Also exposes the available log level and service names, so you can discover valid -Level/-Service values.
Syntax¶
# Entries (default)
Get-JIMLogEntry [-Service <string>] [-Date <datetime>] [-Level <string[]>] [-Search <string>]
[-Limit <int>] [-Offset <int>]
# Levels
Get-JIMLogEntry -ListLevels
# Services
Get-JIMLogEntry -ListServices
Parameters¶
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
Service |
string |
No | Filter by service name (web, worker, scheduler). Omit for all services. |
|
Date |
datetime |
No | today (UTC) | The date to retrieve logs for. |
Level |
string[] |
No | Specific log levels to include (Verbose, Debug, Information, Warning, Error, Fatal). Omit for all levels. |
|
Search |
string |
No | Text to search for in the log message (case-insensitive). | |
Limit |
int |
No | 500 |
Maximum number of entries to return (maximum 5000). |
Offset |
int |
No | 0 |
Number of entries to skip, for paging. |
ListLevels |
switch |
No | $false |
Returns the available log level names instead of log entries. |
ListServices |
switch |
No | $false |
Returns the available service names instead of log entries. |
Output¶
Log entries (timestamp, level, message, service, and any structured properties), or a list of level/service names.
Examples¶
Get-JIMLogEntry -Service worker -Level Warning, Error -Search "timeout"
Get-JIMLogFile¶
Lists the log files JIM currently has on disk, across all services.
Syntax¶
Output¶
Log file metadata: service, date, and size.
Examples¶
Watch-JIMLog¶
Streams log entries to the console as they arrive, colour-coded by level (red for Error/Fatal, yellow for Warning, dark grey for Debug/Verbose). Polls the Logs API on an interval, displaying only entries newer than the last one seen, and runs until interrupted with Ctrl+C. Transient API failures are reported as warnings and polling continues.
Output is formatted for the console; for structured objects suitable for the pipeline, use Get-JIMLogEntry instead.
Syntax¶
Watch-JIMLog [-Service <string>] [-Level <string[]>] [-Search <string>]
[-IntervalSeconds <int>] [-MaxPolls <int>]
Parameters¶
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
Service |
string |
No | Filter by service name (web, worker, scheduler). Omit for all services. |
|
Level |
string[] |
No | Specific log levels to include (Verbose, Debug, Information, Warning, Error, Fatal). Omit for all levels. |
|
Search |
string |
No | Text to search for in the log message (case-insensitive). | |
IntervalSeconds |
int |
No | 2 |
Number of seconds to wait between polls (1-300). |
MaxPolls |
int |
No | Maximum number of poll cycles to run before stopping. Omit to run until interrupted. |
Output¶
None. Each new entry is written to the console as [timestamp] [LEVEL] [service] message, colour-coded by level.
Examples¶
See also¶
- Activities: the audit trail for synchronisation operations, complementary to raw service logs