@supercollider/logger
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@supercollider/logger

NPM downloads MIT License

Console logging utility for supercollider.js for debugging with color support and special formatting for OSC messages.

This is used internally by other @supercollider packages.

Usage

const Logger = require("@supercollider/logger").default;

const debug = true;
const echo = true;

const log = new Logger(debug, echo);
// Log an error.
log.err("Oh no!");
// Log debugging information but only if this.debug is true
log.dbug({ log: "log", some: 1, context: 2, for: "The problem" });
// Log messages that were sent to stdin or sclang.
log.stdin("1 + 1");
// Log messages that were received from stdout of sclang/scsynth.
log.stdout("2");
// Log messages that were emitted from stderr of sclang/scsynth.
log.stderr("ERROR: ...");
// Log OSC messages sent to scsynth.
log.sendosc({ address: "/ping" });
// Log OSC messages received from scsynth.
log.rcvosc({ value: "pong" });

source

Documentation

Documentation

Compatibility

Works on Node 10+

Source code is written in TypeScript and is usable in JavaScript es2018 or TypeScript projects.

Contribute

License

MIT license

Readme

Keywords

Package Sidebar

Install

npm i @supercollider/logger

Weekly Downloads

11

Version

1.0.0

License

MIT

Unpacked Size

15.1 kB

Total Files

8

Last publish

Collaborators

  • crucialfelix