Daniel-Boll / axum-js

A Axum http wrapper for NodeJS
MIT License
5 stars 3 forks source link

Implement Optional Default Logging in Rust Modules #6

Open Daniel-Boll opened 1 year ago

Daniel-Boll commented 1 year ago

To enhance debugging and observability, it's proposed to add optional default logging within the Rust modules of axum-js. This logging should cover key events such as server startup, routes registration, and any other significant lifecycle events. The logging should be designed to be toggled on or off via a JavaScript API to avoid unnecessary log verbosity in production environments.

A proposed API in JavaScript to enable logging might look like this:

import { AxumApp } from "./index";

const app = new AxumApp();

app.registerLogging({ emoji: true, timestamp: true });

In this example:

Potential log messages include:

Acceptance Criteria: