# bool
JSON: boolean (true / false)
true
# int
JSON: number (int)
12345
# string
JSON: string
Any text in double quotes. All another quotes SHOULD be escaped
"Hello \"good\" world"
# object
JSON: object
{
// object properties
}
# html
extends string
Valid html in json string
"Hello <b>world</b>"
# uuid
extends string
You can read more about UUID here: rfc4122 UUID
Recommended to use 4 version of UUID (random)
"5b67d5ef-b9cc-4a3e-896d-93e5f4500e09"
# tsMs
extends int
unixtime (GMT) with milliseconds
1547058561177
# durationMs
extends int
time duration in milliseconds
140
# byte
extends int
size in bytes
1024
example (1 MB)
1000000
# importance
extends int
Importance is int from 1 to 8, used for filtering in client
All standard log levels should be mapped on server
to int by this table:
level | importance | description |
---|---|---|
debug | 1 | Detailed debug information |
info | 2 | Interesting events. Examples: User logs in |
notice | 3 | Normal but significant events |
warning | 4 | Exceptional occurrences that are not errors. Examples: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong |
error | 5 | Runtime errors that do not require immediate action but should typically be logged and monitored |
critical | 6 | Critical conditions. Example: Application component unavailable, unexpected exception |
alert | 7 | Action must be taken immediately. Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up |
emergency | 8 | Emergency: system is unusable |
# Client recommendations
- Use range widget for fast filtering by importance
Example of UI with filters:
Importance:
1 4 8
'--------------------------'
^
# tag
extends string
Tag is string, can be separated with colon :
.
Used for filtering events in client.
# Multipart filter
If tag contain one colon, then:
- left part is
filter name
- right part is
filter value
"name:value"
"scope:kernel"
"db:mysql"
"db:mongo"
# Flag
All tags without colon is flag
(true / false)
"is_production"
"need_refactoring"
# Client rules
- Get all tags from all events and build filters
- If tag is
Multipart filter
, display it likemultiple select
- If tag is
Flag
, display it likecheckbox
- Filters should be sorted by alphabet (ascending order from a-z)
Example of UI with filters:
Event filters:
.-----------..---------..--------.
| db ▲ || scope ▼ || name ▼ | [x] is_production
|-----------|'---------''--------' [ ] need_refactoring
| [v] mysql |
| [ ] mongo |
'-----------'
.--------------------------------------------------------.
| .. |
'--------------------------------------------------------'
.--------------------------------------------------------.
| .. |
'--------------------------------------------------------'
.--------------------------------------------------------.
| .. |
'--------------------------------------------------------'
# method
extends string
HTTP Method (uppercase)
- GET
- HEAD
- POST
- PUT
- PATCH
- DELETE
- OPTIONS
- ANY
- or custom
"POST"
# uri
extends string
Read more about uri in wiki
Full:
"https://example.com:443/api/hello?foo=bar"
Relative:
"/api/hello?foo=bar"
# relativePath
extends string
"/src/renderer/main.js"
# Server rules
- Should be relative to root project directory
- file path SHOULD start with "/"
- Directory separator SHOULD BE "/" on all operation systems
# Client rules
- Replace "/" with directory separator for current operation system. "/" - for unix based, and "\" - for Windows.
- Client SHOULD contain "project root" setting. This "project root" SHOULD be used only for file content loading (for code display purpose).
- All GUI sections should display only relative path as defined.
# location
Allows you to specify the exact link to the position in the project code
Payload definition
key | type | required | description |
---|---|---|---|
file | relativePath | Y | relative path to project root |
line | int | line in file | |
positionStart | int | cursor position in line (work only if "line" defined) | |
positionEnd | int | cursor end position in line (work only if "pos" defined) |
Preview
{
"file": "/src/renderer/main.js",
"line": 123,
"positionStart": 56,
"positionEnd": 56
}
# Client rules
- Prepend defined project root path to "relativePath"
- Load file in Read-only mode and fetch +-3 lines from specified "line"
- If no "line" specified, you should display only path to file
- Do not display absolute path with project root, only relative.
- Highlight all "line", if no "positionStart" specified
- Highlight all "line" and add "cursor" if only "line" and "positionStart" specified
- If "positionStart" and "positionEnd" specified, client application MUST highlight range between pos <= i && i <= pos_end.
# Client recommendations
- Add button "load more" above and below loaded lines.
- Use syntax highlighting based on file extension (without lint)
# param
Payload definition
key | type | required | description |
---|---|---|---|
key | string | Y | param title/code/name |
value | string | Y | param value |
Preview
{
"key": "title",
"value": "hello world"
}
# aclVote
ENUM extends string
"GRANT"
# Enum values
key | description |
---|---|
GRANT | access is allowed for this check (vote for grant access) |
DENIED | access is not allowed for this check (vote for denied access) |