How do I find the log files for an environment?

Table of Contents

Each OreStudio environment writes service logs under its build output directory. The path encodes the CMake preset name, so the same pattern works for every preset.

Question

How do I find the log files for a running OreStudio environment?

Answer

  1. Locate the log directory. Log files live at:

    build/output/<preset>/publish/log/
    

    For the default local development preset:

    ls build/output/linux-clang-debug-make/publish/log/
    
  2. Identify the file for a specific service. Each service writes to <service-name>.<replica-index>.log, e.g.:

    Log file Service
    ores.refdata.service.0.log Reference data service
    ores.trading.service.0.log Trading service
    ores.workspace.service.0.log Workspace service
    ores.wt.service.0.log Wt web UI service
    ores.http.server.0.log HTTP server
    nats-server.log NATS message bus
  3. Tail a service log for live output:

    tail -f build/output/linux-clang-debug-make/publish/log/ores.refdata.service.0.log
    
  4. Grep for errors across all service logs:

    grep -i "error\|fatal\|failed\|connection" \
      build/output/linux-clang-debug-make/publish/log/*.log
    
  5. Find the most recently written log when you are unsure which service is failing:

    ls -lt build/output/linux-clang-debug-make/publish/log/*.log | head -10
    

Script

No wrapper — bare shell commands against the build/output/<preset>/publish/log/ directory.

Tested by

Manual. Run the environment with cmake --build and confirm the log directory is populated.

See also

Emacs 29.3 (Org mode 9.6.15)