Skip to content

Improve MetadataService logging - #765

Merged
MasterKale merged 8 commits into
milestone/v14.0.0from
feat/improved-metadataservice-logging
Jun 14, 2026
Merged

MasterKale merged 8 commits into
milestone/v14.0.0from
feat/improved-metadataservice-logging

Conversation

@MasterKale

@MasterKale MasterKale commented May 27, 2026 •

Copy link
Copy Markdown
Owner

This PR introduces a new logger argument to MetadataService.initialize(). This argument is of type SimpleWebAuthnLogger, which is a simple object of logging methods:

export interface SimpleWebAuthnLogger {
  debug: (message: string, ...args: unknown[]) => void;
  info: (message: string, ...args: unknown[]) => void;
  warn: (message: string, ...args: unknown[]) => void;
  error: (message: string, ...args: unknown[]) => void;
}

The intention is that projects using SimpleWebAuthn can define an instance of this interface that logs the message and arbitrary arguments in a way that makes sense for that project. This eliminates any SimpleWebAuthn-specific logging concerns that led to the old implementation getting ripped out of this project.

Right now only MetadataService will make use of this new logging pattern.

Fixes #751.

@MasterKale MasterKale added the package:server @simplewebauthn/server label May 27, 2026
@MasterKale MasterKale added this to the v14.0.0 milestone May 27, 2026
@MasterKale

Copy link
Copy Markdown
Owner Author

Marking WIP for now until I write some tests. I'm otherwise happy with the current implementation.

@MasterKale
MasterKale marked this pull request as ready for review June 14, 2026 12:22
@MasterKale
MasterKale merged commit 2605b63 into milestone/v14.0.0 Jun 14, 2026
12 checks passed
@MasterKale
MasterKale deleted the feat/improved-metadataservice-logging branch June 14, 2026 12:25
@MasterKale MasterKale linked an issue Aug 5, 2026 that may be closed by this pull request
@MasterKale MasterKale removed this from the v14.0.0 milestone Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package:server @simplewebauthn/server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor MetadataService to use an injected logger

1 participant