Log file formats
A format says how a log file's text is split into entries. The same formats, from the same code, are used by Autologger, which sends each entry as a log line, and by file feeds on the LemmeSee Hub, which keep entries as feed items. Four formats are built in, and you can add your own.
Every entry has a title, a level, a time, and optionally detail lines, each with its own level. Autologger puts the detail lines under the title in one message; a feed shows them as the item's body.
Raw
Each non-empty line is one entry at info, with no detail lines, timed when it was read.
Backup started
Backup finished
LK Log
Each line has a timestamp, a source, and a message. Lines that share a source and run id are one entry: the first line is the title and the rest are its detail lines.
[2026-05-01 02:00:04] [backup:run42] Nightly backup started
[2026-05-01 02:00:09] [backup:run42] dropped: C:\pagefile.sys
[2026-05-01 02:00:20] [backup:run42] 12 folders copied
[2026-05-01 02:01:00] [cleanup] Temp folder emptied
- The source part is
source:run_id. The entry's source is the part before the colon, so the first three lines above are one entry frombackup. - The run id is any text that marks one run of a job, such as a run number or a start time, so each run becomes its own entry even when the same job logs every night.
- A line whose source has no run id, like
[cleanup], is an entry on its own. - The entry's time is its first line's timestamp.
- A line whose message starts with
dropped:iswarning, and so is its whole entry. Everything else isdebug.
Tab Body
A line starting with a timestamp and a level tag starts an entry. The tab-indented lines after it are its detail lines.
[2026-05-01 02:00:04] [INFO] Nightly backup finished
12 folders copied
[WARNING] 3 files skipped (in use)
[2026-05-02 02:00:05] [ERROR] Nightly backup failed
Destination drive not found
- The timestamp is
[YYYY-MM-DD HH:MM:SS], in the PC's local time. It becomes the entry's time. - The level tag is
[ERROR],[WARNING](or[WARN]),[IMPORTANT],[INFO], or[DEBUG]. A title without a tag, or with an unknown one, isdebug. - A detail line can start with its own tag. Untagged detail lines are
debug. - Only the title sets the entry's level. A tag on a detail line, like
[WARNING]above, doesn't change it: in the app the entry stays at its title's level, so the first entry above isinfofor rules and colours. On a hub feed the tagged line is coloured inside the item's body; with Autologger it keeps the tag as text. To make the whole entry a warning, tag its title. - Lines that are neither, and indented lines before the first entry, are skipped.
JUnit XML
A JUnit XML results file, as written by most test runners. Each <testsuite> is one entry:
- The title is
PASSorFAIL, the suite name, its time, and how many tests ran, failed, and were skipped. - The entry is
errorwhen any test failed or errored, otherwisedebug. - Each test case is a detail line. A failure is
errorand includes its message and trace, a skipped test iswarning, and a passing test isdebugunless the feed or Autologger entry setsdefault_body_levelto another level.
A JUnit file is read whole each time it changes, since test runners rewrite it rather than add to it.
Custom formats
A custom format is a Python file named after the format, such as csvlog.py, with a parse(text) function that returns a list of entries:
def parse(text):
entries = []
for line in text.splitlines():
if not line.strip():
continue
level, message = line.split(",", 1)
entries.append({"title": message, "level": level})
return entries
Each entry is a dictionary:
| Key | Required | Meaning |
|---|---|---|
title | Yes | The entry's main line. Entries without one are skipped. |
level | No | debug, info, warning, important, or error. Default info. |
ts | No | Time in milliseconds since 1970. Default: when it was read. |
content | No | Detail lines: a list of {"text": ..., "level": ...}, or plain text. |
source | No | Source name, which overrides the configured one. |
id | No | A stable id, used by feeds to tell entries apart. Default: made from the entry's time, title, and content. |
parse is given only the new text since the last read, except for a file that started over, so an entry should not depend on lines from an earlier read. To accept the configured default_body_level too, define parse(text, default_body_level).
Put the file in the custom formats folder, then use its name, without .py, as the format:
- Autologger:
custom_formatsnext toautologger_config.py, or the folder named byFORMATS_PATHin that config. - LemmeSee Hub: the folder named by
formats_pathin config.json. Custom formats appear in the feed form's Format list.
Names use lowercase letters, digits, and underscores, and can't reuse a built-in name. A changed file is picked up without restarting. If the file fails to load, or parse raises an error, that read gives no entries and the error is printed. A format name with no file behind it is read as Raw.
A custom format is code that runs inside Autologger or the hub, with the same access as they have, the same as plugins and filter scripts. Only add format files you trust.