Documentation home / Native Module API
Native Module API
Structured Logging API
Level-based JSON-lines logging to standard error.
Purpose
Level-based JSON-lines logging to standard error.
Exports registered by the module initializer
| Export | Role |
|---|---|
log | log exported function or value |
debug | debug exported function or value |
info | info exported function or value |
warn | warn exported function or value |
error | error exported function or value |
Usage example
import gs_log;
gs_log.info("service started");
gs_log.warn("cache miss");
gs_log.error("request failed");Optional context values support strings, numbers and booleans; other context values are emitted as null. Output is written to standard error.
greenServeFE