diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index 9a41e5d1..7ac50999 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -13,3 +13,10 @@ - [Design Documents](design_docs.md) - [Pipelinable Block Lookup](./designs/0001-pipelinable-block-lookup.md) + +# Applications +- [Applications](applications.md) + - [zebrad](./applications/zebrad.md) + - [Enviroment variables](./applications/zebrad/enviroment-variables.md) + - [utils](./applications/utils.md) + - [zebra-checkpoints](./applications/utils/zebra-checkpoints.md) diff --git a/book/src/applications.md b/book/src/applications.md new file mode 100644 index 00000000..a217ca63 --- /dev/null +++ b/book/src/applications.md @@ -0,0 +1,4 @@ +# Applications + +- [zebrad](applications/zebrad.md) +- [zebra-checkpoints](applications/utils/zebra-checkpoints.md) diff --git a/book/src/applications/utils.md b/book/src/applications/utils.md new file mode 100644 index 00000000..06588bfb --- /dev/null +++ b/book/src/applications/utils.md @@ -0,0 +1 @@ +# utils diff --git a/book/src/applications/utils/enviroment-variables.md b/book/src/applications/utils/enviroment-variables.md new file mode 100644 index 00000000..4dbd4504 --- /dev/null +++ b/book/src/applications/utils/enviroment-variables.md @@ -0,0 +1 @@ +# zebra-checkpoints diff --git a/book/src/applications/utils/zebra-checkpoints.md b/book/src/applications/utils/zebra-checkpoints.md new file mode 100644 index 00000000..4dbd4504 --- /dev/null +++ b/book/src/applications/utils/zebra-checkpoints.md @@ -0,0 +1 @@ +# zebra-checkpoints diff --git a/book/src/applications/zebrad.md b/book/src/applications/zebrad.md new file mode 100644 index 00000000..8a6fad7a --- /dev/null +++ b/book/src/applications/zebrad.md @@ -0,0 +1,4 @@ +# zebrad + +- [Enviroment variables](./zebrad/enviroment-variables.md) + diff --git a/book/src/applications/zebrad/enviroment-variables.md b/book/src/applications/zebrad/enviroment-variables.md new file mode 100644 index 00000000..9306cfb5 --- /dev/null +++ b/book/src/applications/zebrad/enviroment-variables.md @@ -0,0 +1,29 @@ +# Zebrad enviroment variables + +All zebrad subcommands support the following enviroment variables: +- `ZEBRAD_CACHE_DIR`: The directory to store zebra data just as state, blocks, wallet, etc. +- `ZEBRAD_LOG`: Manipulate the log level. Regex is supported. + +## Examples: + +Use a custom data directory: +``` +export ZEBRAD_CACHE_DIR="/my/zebra_data_dir" +zebrad start +``` + +Output all info messages: + +``` +export ZEBRAD_LOG="info" +zebrad start +``` + +Output block_verify with trace level and above every 1000 blocks: + +``` +export ZEBRAD_LOG="[block_verify{height=Some\(BlockHeight\(.*000\)\)}]=trace" +zebrad start +``` + +Note: Log options are processed in this order: verbose flag, command stdout, enviroment variable, config file. \ No newline at end of file diff --git a/zebrad/src/commands.rs b/zebrad/src/commands.rs index e0165537..3509566d 100644 --- a/zebrad/src/commands.rs +++ b/zebrad/src/commands.rs @@ -24,33 +24,6 @@ use std::path::PathBuf; pub const CONFIG_FILE: &str = "zebrad.toml"; /// Zebrad Subcommands -/// -/// All subcommands support the following enviroment variables: -/// - `ZEBRAD_CACHE_DIR`: The directory to store zebra data just as state, blocks, wallet, etc. -/// - `ZEBRAD_LOG`: Manipulate the log level. Regex is supported. -/// ## Examples: -/// -/// Use a custom data directory: -/// ``` -/// export ZEBRAD_CACHE_DIR="/my/zebra_data_dir" -/// zebrad start -/// ``` -/// -/// Output all info messages: -/// -/// ``` -/// export ZEBRAD_LOG="info" -/// zebrad start -/// ``` -/// -/// Output block_verify with trace level and above every 1000 blocks: -/// -/// ``` -/// export ZEBRAD_LOG="[block_verify{height=Some\(BlockHeight\(.*000\)\)}]=trace" -/// zebrad start -/// ``` -/// -/// Note: Log options are processed in this order: verbose flag, command stdout, enviroment variable, config file. #[derive(Command, Debug, Options, Runnable)] pub enum ZebradCmd { /// The `generate` subcommand