Class: MVXLogger
MapVX Logger Adapter
Default ILogger implementation for the SDK. Provider-agnostic by name so the underlying error-tracking backend can change without affecting the public API. It wraps the internal Logger singleton: errors are captured as exceptions and events/warnings are recorded as breadcrumbs (currently backed by Sentry).
Example
const logger: ILogger = new MVXLogger()
logger.logEvent("user_action", { action: "click" })
logger.logError(new Error("Something failed"))Implements
Constructors
Constructor
new MVXLogger(): MVXLogger;Returns
MVXLogger
Methods
logDebug()
logDebug(...args): void;Logs debug information (only in debug mode)
Parameters
args
…unknown[]
Returns
void
Implementation of
logError()
logError(error, context?): void;Captures an error as a Sentry exception.
Parameters
error
unknown
context?
Record<string, string>
Returns
void
Implementation of
logEvent()
logEvent(eventName, segmentation?): void;Records an analytics-style event as a Sentry breadcrumb.
Parameters
eventName
string
segmentation?
Record<string, string>
Returns
void
Implementation of
logWarning()
logWarning(error, context?): void;Records a warning as a Sentry breadcrumb.
Parameters
error
unknown
context?
Record<string, string>
Returns
void
Implementation of
setToken()
setToken(token): void;Sets the API token used to enrich event segmentation.
Parameters
token
string
Returns
void
Implementation of
Last updated on