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");
CocoaPods
Add the subspec to your Podfile
pod 'PlayerUI/PrintLoggerPlugin'
Swift Usage
var body: some View { SwiftUIPlayer( flow: flow, plugins: [ PrintLoggerPlugin() ], result: $resultBinding )}
To change the severity, supply it as an argument to the constructor:
PrintLoggerPlugin(level: .warn)