Skip to content

Console Logger

A plugin to easily enable logs to be written to the JS console. Extremely helpful for local Player development and debugging.

Usage

Install the plugin:

import { Player } from "@player-ui/player";
import { ConsoleLoggerPlugin } from "@player-ui/console-logger-plugin";
const consoleLogger = new ConsoleLoggerPlugin();
const player = new Player({
plugins: [consoleLogger],
});

To change the severity:

consoleLogger.setSeverity("warn");