Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added env_logger to all bastion's examples. #98

Merged
merged 1 commit into from
Nov 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bastion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@ qutex = { version = "0.2", features = ["async_await"] }
uuid = { version = "0.8", features = ["v4"] }

[dev-dependencies]
env_logger = "0.7"
proptest = "0.9"
snap = "0.2"
2 changes: 2 additions & 0 deletions bastion/examples/callbacks.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use bastion::prelude::*;

fn main() {
env_logger::init();

Bastion::init();

Bastion::supervisor(sp).expect("Couldn't create the supervisor.");
Expand Down
6 changes: 4 additions & 2 deletions bastion/examples/getting_started.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
use bastion::prelude::*;

fn main() {
/// Creating the system's configuration...
env_logger::init();

// Creating the system's configuration...
let config = Config::new().hide_backtraces();
// ...and initializing the system with it (this is required)...
Bastion::init_with(config);
Expand Down Expand Up @@ -127,7 +129,7 @@ fn main() {
Bastion::broadcast("A message containing data.").expect("Couldn't send the message.");

// Stopping or killing the system...
Bastion::stop();
//Bastion::stop();
// Bastion::kill();

// Blocking until the system has stopped (or got killed)...
Expand Down
2 changes: 2 additions & 0 deletions bastion/examples/middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ use std::sync::Arc;
/// Try increasing the worker count. Yes!
/// In addition to that try benchmarking with `ab`, `wrk` or `siege`.
fn main() {
env_logger::init();

Bastion::init();

// Workers that process the work.
Expand Down
2 changes: 2 additions & 0 deletions bastion/examples/parallel_computation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ use std::sync::Arc;
///
/// Try increasing the worker count. Yes!
fn main() {
env_logger::init();

Bastion::init();

// Workers that process the work.
Expand Down
2 changes: 2 additions & 0 deletions bastion/examples/send_recv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;

fn main() {
env_logger::init();

Bastion::init();

let started = AtomicBool::new(false);
Expand Down