aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimbeerserverDE <himbeerserverde@gmail.com>2023-06-03 14:25:45 +0200
committerHimbeerserverDE <himbeerserverde@gmail.com>2023-06-03 14:25:45 +0200
commitf52cb98b5da3a9080391c14c829080a2404c95eb (patch)
treecd218cdca33fddaaa3e2f3e8683bf6fa7e7ceee4
parentc37a282a3fe4405e455abc4992b5516db7f75cc6 (diff)
work more nicely with the new logging system
-rw-r--r--src/main.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main.rs b/src/main.rs
index 2c11228..89db44c 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -26,7 +26,7 @@ struct DataRequest {
}
async fn handle_reboot() -> HttpResponse {
- println!("[admind] request reboot");
+ println!("request reboot");
match reboot(RebootMode::RB_AUTOBOOT) {
Ok(_) => HttpResponse::Ok()
@@ -39,7 +39,7 @@ async fn handle_reboot() -> HttpResponse {
}
async fn handle_shutdown() -> HttpResponse {
- println!("[admind] request shutdown");
+ println!("request shutdown");
match reboot(RebootMode::RB_POWER_OFF) {
Ok(_) => HttpResponse::Ok()
@@ -52,7 +52,7 @@ async fn handle_shutdown() -> HttpResponse {
}
async fn handle_update_boot(data: web::Bytes) -> HttpResponse {
- println!("[admind] update boot");
+ println!("update boot");
let boot = match boot_dev() {
Ok(v) => v,
@@ -86,7 +86,7 @@ async fn handle_update_boot(data: web::Bytes) -> HttpResponse {
}
async fn handle_update_mbr(data: web::Bytes) -> HttpResponse {
- println!("[admind] update mbr");
+ println!("update mbr");
let mbr = match dev() {
Ok(v) => v,
@@ -108,7 +108,7 @@ async fn handle_update_mbr(data: web::Bytes) -> HttpResponse {
}
async fn handle_update_root(data: web::Bytes) -> HttpResponse {
- println!("[admind] update inactive root");
+ println!("update inactive root");
let root = match inactive_root() {
Ok(v) => v,
@@ -130,7 +130,7 @@ async fn handle_update_root(data: web::Bytes) -> HttpResponse {
}
async fn handle_switch() -> HttpResponse {
- println!("[admind] switch to inactive root");
+ println!("switch to inactive root");
match switch_to_inactive_root() {
Ok(_) => HttpResponse::Ok()
@@ -173,7 +173,7 @@ async fn main() -> io::Result<()> {
match start().await {
Ok(_) => {}
Err(e) => {
- println!("[admind] start error: {}", e);
+ println!("start error: {}", e);
return Ok(());
}
}
@@ -184,7 +184,7 @@ async fn main() -> io::Result<()> {
async fn start() -> Result<()> {
let config = load_rustls_config()?;
- println!("[admind] start https://[::]:8443");
+ println!("start https://[::]:8443");
Ok(HttpServer::new(|| {
let auth = HttpAuthentication::basic(basic_auth_validator);