Skip to content

Learn how to use fern to write logs in rust, and how to use ndarray to read arrays from txt files.

Notifications You must be signed in to change notification settings

amyzx/fern_ndarray_learn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fern_ndarray_learn

Learn how to use fern to write logs in rust, and how to use ndarray to read arrays from txt files.

Files

Cargo.toml: we define dependencies including fern and ndarray in this file.

src/

file_util.rs: contain 2 functions which read 2d array from files.

lib.rs: contains a fern logger initializer which set log file name.

src/bin/

data.txt: example data which contains a 2d array.

file_load.rs: test the functions defined in file_util.rs.

output.log: we can use debug! to write to a common log file.

How to run

cd FERN_NDARRAY_LEARN/src/bin
cargo run --bin file_load --release

About

Learn how to use fern to write logs in rust, and how to use ndarray to read arrays from txt files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages