loggs

Crates.iologgs
lib.rsloggs
version0.1.0
sourcesrc
created_at2022-12-05 19:02:07.569531
updated_at2022-12-05 19:02:07.569531
descriptionA simple opinionated logger for Windows and Linux applications
homepage
repositoryhttps://github.com/lukas0008/loggs
max_upload_size
id730541
size5,006
(lukas0008)

documentation

README

loggs

Simple opinionated logger for Windows and Linux applications

Example


use loggs::Logger;

fn main() {
  let logger = Logger::new_default_location("testapp");

  // Add a log `Hello logs!` inside of a collection of logs named `main_app`
  logger.log("main_app", "Hello logs!");

  // Save logs explicitly
  logger.save_logs();

  // This will make it so if your app panics, the logs will be saved
  logger.save_on_panic();
}

The above code will create the following file structure:

on Windows - %AppData%/[app_name]/Logs/[current_time]/main_app.log.txt
on Linux - /var/log/[app_name]/[current_time]/main_app.log.txt

Commit count: 2

cargo fmt