Skip to content

Logs

Every Abacus program and every service keeps its own log. It is the first place to look when something misbehaves, and it is what support needs from you alongside a description of the problem.

Where the files are

The log directory is not configurable. A program tries several locations in turn and writes to the first one it can.

On Windows:

  1. %ProgramData%\Abacus\Logs\
  2. a Logs directory next to the program's executable
  3. %LocalAppData%\Abacus\Logs\

On Linux (services only):

  1. /var/log/abacus/
  2. /opt/abacus/log/
  3. ~/.config/abacus/log/

If none of these directories are writable, the program keeps running, but without a log.

File names

Each program writes to a file named after itself: app_sklad.log, app_casa.log, app_barcom.log, app_service.log, launcher.log. Services take the name from their own configuration - by default abhard.log, abasyn.log, abrest.log.

When a file grows past its size limit, it gets a date and time in its name - app_sklad-20260829-143255.log, for instance - and the program carries on writing to a clean file under the usual name. In other words, current events are always in the file without a date; the dated files are the archive.

Settings

In the programs, log settings live in settings.yaml next to the executable, in a log block:

log:
  level: 2
  maxsizekb: 10240
  keepfiles: 10

Services carry the same block in their own configuration (abhard.yaml, abasyn.yaml, abrest.yaml) with one extra field, the file name:

log:
  file: 'abhard.log'
  level: 3
  maxsizekb: 10240
  keepfiles: 10
Key Default Description
file the service name Log file name. Services only; programs derive it from their own name
level 3 for services, 2 for programs How much detail reaches the log, see the table below
maxsizekb 10240 Size in kilobytes at which the file is moved aside into the archive. 0 turns splitting off and the file grows without limit
keepfiles 10 How many files to leave in the directory, the live one included. 0 turns cleanup off and archives accumulate without limit

Changes take effect when the program or service restarts.

Detail levels

level What reaches the log
0 Errors only
1 Errors and warnings
2 Plus informational messages about what is going on
3 Plus debugging detail

If the log grows too fast, lower level first - that removes the cause, whereas a smaller maxsizekb only moves the same lines into the archive more often. For a support request, though, 3 is what you want: at lower levels the file will not hold the detail needed to reconstruct the problem.

Splitting and cleaning up archives

The size is checked after every line written, so a file can end up a few hundred bytes over maxsizekb - a line is never split across two files.

Surplus archives are deleted at two moments: right after each split, and when the program starts. The live file - the one without a date in its name - is never deleted.

If a file cannot be moved aside (an antivirus holding it open, say), the program keeps writing to it and retries later. The log will temporarily exceed maxsizekb, but no line is lost.