-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Probe: log crate #8
Comments
Implementing a logger is pretty simple; here's the example code provided in the docs: use log::{Record, Level, Metadata};
struct SimpleLogger;
impl log::Log for SimpleLogger {
fn enabled(&self, metadata: &Metadata) -> bool {
metadata.level() <= Level::Info
}
fn log(&self, record: &Record) {
if self.enabled(record.metadata()) {
println!("{} - {}", record.level(), record.args());
}
}
fn flush(&self) {}
} It should be easy to create a logger that turns these logged records into events to send to the aggregator. The specifics will depend on what we define those events to look like, but here are some general ideas on what things we could be watching out for to turn into sound:
|
Yeah, these all sound good. Supposing the event as proposed in #11, the probe could send an event for each log with a quality set based on the log-level: low for debug and high for errors and then pair it up with a sound effect that varies volume based on event frequency and goes from a sine wave to square wave based on the quality. |
No description provided.
The text was updated successfully, but these errors were encountered: