URL Scheme
Logger supports using a URL scheme to open the app and to get the logging status, allowing you to easily integrate it into other automations.
Viewing Logs
To open Logger and view logs, use shortcuts-logger://logs
or shortcuts-logger://viewLogs
.
You can add the following query parameters to the URL:
-
tag
: Tag applied to the entry -
search
: Entries containing this text -
contentType
:JSON
orImages
-
category
: Entries with a specific category. Valid values areInfo
,Success
,Warning
,Error
-
device
: ies logged by a device type. Valid values areiPhone
,iPad
,Mac
An example URL including all of these is:
shortcuts-logger://logs?tag=banana&search=fruit&contentType=JSON&category=Info&device=iPhone
Don't forget to URL encode tag names and your search text.
Get Logging Status
Calling shortcuts-logger://getLoggingStatus
will return if logging is enabled or disabled. By default, it will call the x-success
parameter URL with an enabled
attribute set to true
or false
. E.g.
shortcuts-logger://getLoggingStatus?x-success=drafts://x-callback-url/create?text=Hello%20World
Will add &enabled=true
to the success URL (if logging is enabled)1.
If you would like to call x-success
with a different parameter, you can specify a retParam
parameter which will set the name of the parameter to return instead. E.g.
shortcuts-logger://getLoggingStatus?retParam=banana&x-success=drafts://x-callback-url/create?text=Hello%20World
Will add &banana=false
to the success URL (if logging is disabled)1.