mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 19:57:25 +01:00
backend: Add simple custom logger
This commit is contained in:
parent
0d06fb3a31
commit
aa2fb7ec08
5 changed files with 70 additions and 5 deletions
|
|
@ -20,6 +20,8 @@ pub use error::*;
|
|||
pub mod library;
|
||||
pub use library::*;
|
||||
|
||||
mod logger;
|
||||
|
||||
pub mod player;
|
||||
pub use player::*;
|
||||
|
||||
|
|
@ -70,8 +72,11 @@ pub struct Backend {
|
|||
|
||||
impl Backend {
|
||||
/// Create a new backend initerface. The user interface should subscribe to the state stream
|
||||
/// and call init() afterwards.
|
||||
/// and call init() afterwards. There may be only one backend for a process and this method
|
||||
/// may only be called exactly once. Otherwise it will panic.
|
||||
pub fn new() -> Self {
|
||||
logger::register();
|
||||
|
||||
let (state_sender, _) = broadcast::channel(1024);
|
||||
let (library_updated_sender, _) = broadcast::channel(1024);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue