Skip to content
This repository has been archived by the owner on Jun 21, 2020. It is now read-only.

Commit

Permalink
DOC: Added docs for CLI and loggings
Browse files Browse the repository at this point in the history
  • Loading branch information
elichai committed May 19, 2019
1 parent 19319de commit d9a7c96
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
7 changes: 7 additions & 0 deletions enigma-core/app/src/cli.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
//! # Enigma Core CLI.
//!
//! We use `StructOpt` to easily generate the CLI https://github.com/TeXitoi/structopt <br>
//! it uses rustdocs for the `--help` menu, and proc macros to get long/short and parsing methods. <br>
//! it is used by running `let opt: Opt = Opt::from_args();` and thn it will fill up the struct from the user inputs.
//! (and of course fail if needed)
use std::path::PathBuf;
use structopt::StructOpt;

Expand Down
1 change: 1 addition & 0 deletions enigma-crypto/src/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use enigma_types::Hash256;
/// let ready = hash::prepare_hash_multiple(&[msg, msg2]);
/// ```
#[cfg(any(feature = "sgx", feature = "std"))]
#[allow(unused_imports)]
pub fn prepare_hash_multiple<B: AsRef<[u8]>>(messages: &[B]) -> crate::localstd::vec::Vec<u8> {
use crate::localstd::{vec::Vec, mem};
let mut res = Vec::with_capacity(messages.len() * mem::size_of::<usize>());
Expand Down
10 changes: 9 additions & 1 deletion enigma-tools-u/src/common_u/logging.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
use std::{fs::{self, File}, path::Path};
//! # Enigma Core Logging.
//!
//! For logs we use the official `log` facade (https://github.com/rust-lang-nursery/log) <br>
//! This module returns loggers according to the inputs (a file logger and a stdout logger) <br>
//! they catch the logs themselves from the `log` facade. <br>
//! Default verbosity for stdout logger is `Error` and each verbose level will increase it accordingly. <br>
//! Default verbosity for the file logger is `Warn` and it's always one level above the stdout logger. <br>

use std::{fs::{self, File}, path::Path};
use failure::Error;
use log::LevelFilter;
use simplelog::{SharedLogger, WriteLogger};
Expand Down

0 comments on commit d9a7c96

Please sign in to comment.