The root logger with empty category
Retrieves a logger for the specified file path or URL.
Extracts a hierarchical category array from the path for logger categorization.
Automatically configures LogTape on first use if the extracted category starts
with "." (local code) and LogTape is not yet configured. Default configuration
includes console sink with visual severity prefixes, LogTape meta logger set to
"warning" level, and local code logger at "info" level.
Path resolution:
Local code (your project): Paths prefixed with ".". If URL provided
(for instance, import.meta.url), pathname is parsed and segments after src/
directory are extracted (or filename only if src/ not found). Extensions
and "index" segments are removed.
Imported packages (from node_modules/): Non-scoped packages prefixed with
"@" (for instance, ["@", "lodash"]), scoped packages use two segments (for instance,
["@metreeca", "post"]). Build directories (dist, lib, build, out)
and redundant package name folders are skipped. Extensions and "index"
segments are removed from remaining paths.
File path or URL to create logger category from
Logger instance for the resolved category
Retrieves a logger for the specified category array.
Automatically configures LogTape on first use if the category starts with "."
and LogTape is not yet configured. Default configuration includes console sink
with visual severity prefixes, LogTape meta logger at "warning" level, and
local code logger at "info" level.
Hierarchical logger category segments
Logger instance for the specified category
Configures LogTape with category-to-level mappings.
Configures LogTap with a single console logger using visual severity prefixes and a configuration derived from a simplified representation mapping categories to minimum log levels:
Each key represents a LogTape category array as a slash-separated path, with "." prefix
for internal project code and "@" prefix for external dependencies (for instance,
"./utils" for category [".", "utils"] or "@/lodash" for ["@", "lodash"]).
Each value specifies the minimum log level ("trace", "debug", "info",
"warning", "error", "fatal"); invalid levels are filtered out.
Path-to-level mapping for logger configuration
Retrieves the root logger instance.