@multiplatform.one/logger
v7.4.1
Published
Platform-aware logger with pluggable transports for multiplatform.one
Readme
@multiplatform.one/logger
Platform-aware logger for multiplatform.one with pluggable transports — the
same logger.info(...) call routes to the right sink on web, native, and
Tauri, tagged with the precise platform name.
Install
pnpm add @multiplatform.one/loggerNo peer dependencies.
What it owns
logger— a ready-to-use singleton, pre-tagged withplatform.preciseNamefrom@multiplatform.one/platformLogger— construct your own with a name orLoggerOptions(metadata, transports)BaseLoggerand the transport layer for custom sinks
What it must not do
- No UI and no error reporting policy — apps decide where warnings go
(Sentry wiring lives in
@multiplatform.one/core)
Usage
import { Logger, logger } from "@multiplatform.one/logger";
// Singleton, named after the current platform
logger.info("app started");
logger.warn("cache miss", { key: "user:42" });
logger.error(new Error("boom"));
// Named logger for a subsystem
const syncLogger = new Logger("sync");
syncLogger.debug("subscription opened");Levels: debug, info, warn, error.
License
Apache-2.0
