Creates and returns a new logger instance for an application wide standardized logging. For available log methods see Logger interface. The log level is globally configured (see vite.config.ts).
You can create a logger with an arbitrary-prefix:
const logger = createLogger("some-prefix");logger.debug("..."); Copy
const logger = createLogger("some-prefix");logger.debug("...");
With recent version of the trails vite plugin, you can also use this convenient way to create a logger:
import { sourceId } from "open-pioneer:source-info";// sourceId is an automatic identifier based on the current file.const LOG = createLogger(sourceId); Copy
import { sourceId } from "open-pioneer:source-info";// sourceId is an automatic identifier based on the current file.const LOG = createLogger(sourceId);
Prefix used to prefix all log messages invoked by the created logger instance.
Creates and returns a new logger instance for an application wide standardized logging. For available log methods see Logger interface. The log level is globally configured (see vite.config.ts).
You can create a logger with an arbitrary-prefix:
With recent version of the trails vite plugin, you can also use this convenient way to create a logger: