Crate dev_utils

source ·
Expand description

DEV_UTILS is a collection of utilities for development.

It contains utilities for logging, terminal, files, etc.

Add this to your Cargo.toml:

[dependencies]
dev_utils = "0.*"  # Add the latest version of this crate
log = "0.*"  # This crate also depends on the log crate, so add it too

Usage

use dev_utils::log::print_app_data;
use dev_utils::log::rlog::RLog;  // Logger (RLog) from this crate
use log::LevelFilter;  // Log crate
 
fn main() {
    print_app_data(file!());  // Print application data (name, version, authors, etc.)
    RLog::init_logger(LevelFilter::Trace);  // Initialize the logger with the given log level
    log::info!("Some data!");  // [2021-01-01 00:00:00] INFO: Hello World!
    // Your code here...
}

Modules

  • Some conversion utilities.
  • Some of the most common file operations to manipulate files and directories.

Functions

  • Clears the terminal screen and extracts relevant information from the ‘Cargo.toml’ file, then prints this information in a structured format.