tracing-oslog 0.1.0

A layer for tracing that outputs to the oslog on macOS/iOS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use tracing_core::Subscriber;
use tracing_subscriber::{layer::Layer, registry::LookupSpan};

pub struct OsLogger;

impl OsLogger {
	pub fn new<S, C>(_subsystem: S, _category: C) -> Self
	where
		S: AsRef<str>,
		C: AsRef<str>,
	{
		eprintln!("Initializing OsLogger on non-Apple platform! Nothing will be logged by it!");
		Self
	}
}

impl<S> Layer<S> for OsLogger where S: Subscriber + for<'a> LookupSpan<'a> {}