General settings

The config is stored in the home directory ~/.logseer/logseer.json. It is created on startup if it doesn’t exist.

{
    "font": {
        "name": "Mono",
        "size": 10
    },
    "search": {
        "caseSensitive": false,
        "messageOnly": false,
        "regex": false
    }
}

font.name is the font name used for the log text itself.

font.size is the font size in points.

search.* are the current search settings. They are updated at runtime by logseer.

Regex parsers

It is possible to extend logseer via format description files stored in the ~/.logseer/regex/ directory.

Each file name needs to have the following format <priority>_name.json. When logseer opens a log file it tries each json in succession according to its priority, with 0 being the highest priority.

Let’s take this simple log as an example

10 INFO CORE message 1
15 INFO SUB message 2
17 WARN CORE message 3
20 INFO SUB message 4
30 ERR CORE message 5
40 WARN SUB message 6

simple-log

Its format can be described with the following json

{
    "description": "test description",
    "regex": "(\\d+) (.*?) (.*?) (.*)",
    "columns": [
        {
            "name": "Timestamp",
            "group": 1,
            "indexed": false
        },
        {
            "name": "Level",
            "group": 2,
            "indexed": true
        },
        {
            "name": "Component",
            "group": 3,
            "indexed": true
        },
        {
            "name": "Message",
            "group": 4,
            "indexed": false
        }
    ],
    "colors": [
        {
            "column": "Level",
            "value": "ERR",
            "color": "ff0000"
        },
        {
            "column": "Level",
            "value": "WARN",
            "color": "aa0000"
        }
    ]
}

description is a text description. It is unused for now.

regex specifies a pattern that extracts the columns from a text line. It needs to produce a set of regex groups, that will then be treated as columns. There might be unused groups.

magic (not shown) is the first characters of the log file (a type code), in the same sense as PE is the type code of Windows executables, or BMP it the type code of bitmap image files.

columns is an array and provides descriptions for columns, extracted using the regex property.

columns.name is the header of the column, as it appears in the UI.

columns.group is the index of the regex group, that provides the value for this column.

columns.indexed is a boolean indicating that the column should allow filtering. It makes sense to mark as indexed columns with a small range of possible values.

colors is an array of predicates, that allow changing line colors in the UI. When considering the line color, logseer evaluates the predicates in order, until the first match (if any).

colors.column is the name of the column, which value is being considered.

colors.value is the expected value of the column.

colors.color is an RGB hex value of the color.