Skip to main content

rivet_logger/
log_service.rs

1#[derive(Debug, Default, Clone, Copy)]
2pub struct LogService;
3
4impl LogService {
5    pub fn channel(&self, channel: impl Into<String>) -> crate::ChannelLog {
6        crate::Log::channel(channel)
7    }
8
9    pub fn debug(&self, message: impl AsRef<str>) {
10        crate::Log::debug(message);
11    }
12
13    pub fn info(&self, message: impl AsRef<str>) {
14        crate::Log::info(message);
15    }
16
17    pub fn warn(&self, message: impl AsRef<str>) {
18        crate::Log::warn(message);
19    }
20
21    pub fn error(&self, message: impl AsRef<str>) {
22        crate::Log::error(message);
23    }
24}