Utility logger module using Consola, providing log level checks, tagged loggers, and initialization control.
// Source: https://github.com/appium/appium | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
/**
* It's a logger.
*
* Since this is a CLI app only, it doesn't necessarily make sense to consume `@appium/support`'s logger.
*
* @module
*/
import {createConsola} from 'consola';
import type {ConsolaInstance, LogLevel} from 'consola';
import {DEFAULT_LOG_LEVEL, LogLevelMap} from './constants.js';
/**
* The global log level
*
* "Global" inasmuch as any logger created from the root logger will use this level.
*/
let globalLevel: LogLevel = LogLevelMap[DEFAULT_LOG_LEVEL];
/**
* Type guard to see if a string is a recognized log level
* @param level any value
*/
export functi
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key