Log

The Nyra framework supports extensions developed in multiple programming languages operating within the same process. This introduces the necessity for a unified logging mechanism, providing consistent formatting and comprehensive information across logs to streamline debugging and diagnostics.

To meet this requirement, nyra_env offers a robust logging API. Within each extension callback, an instance of nyra_env is accessible. This instance enables extensions, regardless of the language in which they are developed, to output logs into a centralized and consistently formatted log stream.

Key Features of the Logging API:

  1. Unified Log Output: Logs from extensions implemented in various languages are merged into a single, standardized log stream, ensuring clarity and ease of debugging.

  2. Core Parameters:

    • Log Level: Specifies the severity or type of the log (e.g., debug, info, warning, error).

    • Log Message: Contains the details or content of the log.

  3. Convenience Methods: For simplicity, the API also provides shorthand variations that only require the message parameter, automatically setting a default log level.

Benefits

This unified logging approach ensures consistency across the framework, simplifying debugging, monitoring, and maintaining extensions in multi-language environments while promoting a seamless development experience.

Last updated