greenServeFEgreenServeFE

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

ExportRole
loglog exported function or value
debugdebug exported function or value
infoinfo exported function or value
warnwarn exported function or value
errorerror 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.

Related references

Module catalog · Native ABI · GSVE language