cargo install logram
echo id
mode: logram echo_id --token=...
logram --config=...
```yaml telegram: chat_id: 12345678 # chat id token: 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11 # bot token
sources: fs: entries: # paths to watching files or dirs - /tmp/log_file
journald: units: # names of systemd units for watching - docker.service - nginx.service ```
sudo ln -s /home/<user>/.cargo/bin/logram /usr/bin/logram
/etc/logram.yaml
logram.service
to /etc/systemd/system
sudo systemctl daemon-reload
sudo systemctl enable logram
sudo systemctl start logram
log
logram
as library
toml
logram = "1.1"
fn main() { logram::init( "bot token".tostring(), "chat id".tostring(), Level::Error, ) .unwrap();
trace!("trace");
debug!("debug");
info!("info");
warn!("warn");
error!("error");
log!(Level::Error, "Received errors: {}", "a");
log!(target: "app_events", Level::Warn, "App warning")
} ```