diff --git a/README.md b/README.md index 710be07..01384e3 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # health-check -A health check executable that checks for common server failure modes + +A health check executable that checks for common server failure modes. diff --git a/examples/sleep-check.rs b/examples/sleep-check.rs index 4fc89ee..636e23a 100644 --- a/examples/sleep-check.rs +++ b/examples/sleep-check.rs @@ -16,7 +16,9 @@ impl Cli { fn run(&self) { loop { if self.stdout_print { - println!("Printing to stdout"); + for _ in 1..50 { + println!("Printing to stdout"); + } } eprintln!("Printing to stderr {}", self.output_timeout); std::thread::sleep(Duration::from_secs(self.output_timeout.into())); diff --git a/src/cli.rs b/src/cli.rs index af013bc..dfec7a4 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -50,7 +50,7 @@ pub(crate) struct Cli { #[arg(required = false)] pub(crate) args: Vec, /// How many lines of output should we store for error messages? - #[arg(long, default_value_t = 10)] + #[arg(long, default_value_t = 50, env = "HEALTH_CHECK_OUTPUT_LINES")] pub(crate) output_lines: usize, } diff --git a/src/slack.rs b/src/slack.rs index 3f8b1ba..cac3552 100644 --- a/src/slack.rs +++ b/src/slack.rs @@ -75,12 +75,15 @@ impl SlackApp { }, }, { - "type": "section", - "text": { - "type": "plain_text", - "text": latest_output, - } - }, + "type": "divider" + } + ], + "attachments": [ + { + "mrkdwn_in": ["text"], + "author_name": "Logs", + "text": latest_output + } ] }); if let Some(image_url) = &self.app_info.image_url {