Logging from a Scala Agent
SkillCommunicationAdds logging so your Scala Golem agent can print debug, info and error messages while running.
Use Logging from a Scala Agent in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add Logging from a Scala Agent and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the Logging from a Scala Agent skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
No other account needed.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
About this skill
Adding logging to a Scala Golem agent. Use when the user asks about logging, log messages, log levels, wasi:logging, golem.wasi.Logging, or printing debug/info/error output from a Scala agent.
What this skill tells your AI
The instructions your AI receives, as published by golemcloud/golem in golem-skills/skills/scala/golem-logging-scala/SKILL.md and read by ahel’s review.
The Scala SDK provides golem.wasi.Logging — a typed facade over wasi:logging/logging with convenience methods for each log level and an optional context parameter.
Quick Start
Import and use the Logging object directly — no initialization needed:
import golem.wasi.Logging
Logging.info("order created: " + orderId)
Logging.debug("processing item: " + itemId)
Logging.warn("retry attempt " + attempt + " for request " + reqId)
Logging.error("failed to connect: " + err.getMessage)
Log Levels
| Method | WASI Level | Use for |
|---|---|---|
Logging.trace(msg) | trace | Fine-grained control flow |
Logging.debug(msg) | debug | Debugging information |
Logging.info(msg) | info | Monitoring, normal operations |
Logging.warn(msg) | warn | Hazardous situations |
Logging.error(msg) | error | Serious errors |
Logging.critical(msg) | critical | Fatal errors |
Context Strings
Every method accepts an optional context parameter (defaults to ""). Use it to scope log entries to a subsystem or request:
Logging.info("connected to database", context = "db")
Logging.debug(s"query took ${ms}ms", context = "db/query")
Logging.error(s"timeout after ${retries} retries", context = "http-client")
For the lowest-level API, call Logging.log directly:
Logging.log(Logging.Level.Critical, "shutdown", "system is shutting down")
Using println / System.err.println
Standard output and error also work and are captured by Golem:
println("stdout message")
System.err.println("stderr message")
These appear in golem agent stream output but lack log levels and context. Prefer Logging.* methods for structured, filterable logging.
Viewing Logs
Stream live agent output:
golem agent stream '<agent-id>'
Or during an invocation:
golem agent invoke '<agent-id>' '<method>' [args]
Key Points
- No setup needed —
golem.wasi.Loggingis available fromgolem-scala-corewhich is already in the project dependencies - All methods map directly to the
wasi:logging/loggingWASI interface - Context strings help group and filter log entries by subsystem
- Logs are recorded in the oplog and visible via
golem agent streamandgolem agent invoke - Logging is a side effect — during replay (crash recovery), log calls from replayed operations are skipped
Signals
- GitHub stars
- 2k
- Forks
- 209
- Last commit
- Oct 2026
Advanced
- Item type
- skill
- Key
golem-logging-scala- Source
- github.com/golemcloud/golem
More in Communication
Skill · anthropics
More in Communicationerror-handling
Skill · affaan-m
More in Communicationemails
Skill · coreyhaines31
More in Communicationazure-messaging
Skill · microsoft
More in Communicationinvestor-outreach
Skill · affaan-m
More in Communicationgws-gmail
Skill · googleworkspace
More in Communication