Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Logging and Tracing

Bozo Dragojevic edited this page Apr 21, 2016 · 1 revision

Logging in quark

Quark offers a logging.Logger interface:

namespace quark { namespace logging {
    @doc("A logging facility")
    primitive Logger {
        @doc("emit a log at trace level")
        void trace(String msg);
        @doc("emit a log at debug level")
        void debug(String msg);
        @doc("emit a log at info level")
        void info(String msg);
        @doc("emit a log at warn level")
        void warn(String msg);
        @doc("emit a log at error level")
        void error(String msg);
    }

The Logger is instantiated through quark.Runtime#logger(String topic) method.

Loggers are designed to integrate with target logging system

  • java uses java.util.logging.Logger
  • ruby uses gem logging
  • python uses module logging
  • javascript uses a custom implementation to support browsers

Logger topic is always prefixed with "quark."

Tracing from quark main()

By default quark leaves logging configuration to the application. When testing quark code with quark test harness quark allows logging to be configured within quark. For an example see logging_config.q

Tracing of IO

Quark runtime logs all IO requests and their callbacks using the quark logging facility

Clone this wiki locally