Skip to main content
Version: 5.3

PlanetKit initialization and log setting

You must initialize PlanetKit before using any functions of LINE Planet in your application. This page provides a code example for initializing PlanetKit and configuring log settings.

Note

WebPlanetKit uses different library files depending on the development environment. Use planetKit.eval.js in the Evaluation environment and planetKit.js in the Real environment.

Initialization

WebPlanetKit has two instances, one for 1-to-1 calls and one for group calls (conference). You can create each instance by calling PlanetKit.Call() or PlanetKit.Conference() with a configuration argument, and you can also set the log level.

1-to-1 call

const config = {
logLevel: 'log'
};
const planetKit = new PlanetKit.Call(config);

Group call

const config = {
logLevel: 'log'
};
const planetKit = new PlanetKit.Conference(config);

Log setting

By default, logging is enabled in WebPlanetKit. You can adjust the debug output level by setting the log level at initialization.

There are four log levels as follows. 'error' provides the simplest log and the log level becomes more detailed as it goes to 'debug'.

  • 'error'
  • 'warn'
  • 'log'
  • 'debug'