mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 04:01:58 +00:00
improved debuggability
This commit is contained in:
@@ -78,7 +78,7 @@ pub struct RpcContextSeed {
|
||||
}
|
||||
impl Drop for RpcContextSeed {
|
||||
fn drop(&mut self) {
|
||||
tracing::error!("RpcContext is dropped");
|
||||
tracing::info!("RpcContext is dropped");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
fn main() {
|
||||
#[cfg(feature = "backtrace-on-stack-overflow")]
|
||||
unsafe {
|
||||
backtrace_on_stack_overflow::enable()
|
||||
};
|
||||
startos::bins::startbox()
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ use std::net::Ipv4Addr;
|
||||
|
||||
use clap::Parser;
|
||||
use ipnet::Ipv4Net;
|
||||
use rpc_toolkit::{Context, Empty, HandlerExt, ParentHandler, from_fn_async};
|
||||
use rpc_toolkit::{from_fn_async, Context, Empty, HandlerExt, ParentHandler};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::context::CliContext;
|
||||
@@ -22,7 +22,7 @@ pub fn tunnel_api<C: Context>() -> ParentHandler<C> {
|
||||
subnet_api::<C>().with_about("Add, remove, or modify subnets"),
|
||||
)
|
||||
// .subcommand(
|
||||
// "forward",
|
||||
// "port-forward",
|
||||
// ParentHandler::<C>::new()
|
||||
// .subcommand(
|
||||
// "add",
|
||||
@@ -77,19 +77,19 @@ pub fn subnet_api<C: Context>() -> ParentHandler<C, SubnetParams> {
|
||||
// .with_call_remote::<CliContext>(),
|
||||
// )
|
||||
// .subcommand(
|
||||
// "add-client",
|
||||
// from_fn_async(add_client)
|
||||
// "add-device",
|
||||
// from_fn_async(add_device)
|
||||
// .with_metadata("sync_db", Value::Bool(true))
|
||||
// .no_display()
|
||||
// .with_about("Add a client to a subnet")
|
||||
// .with_about("Add a device to a subnet")
|
||||
// .with_call_remote::<CliContext>(),
|
||||
// )
|
||||
// .subcommand(
|
||||
// "remove-client",
|
||||
// from_fn_async(remove_client)
|
||||
// "remove-device",
|
||||
// from_fn_async(remove_device)
|
||||
// .with_metadata("sync_db", Value::Bool(true))
|
||||
// .no_display()
|
||||
// .with_about("Remove a client from a subnet")
|
||||
// .with_about("Remove a device from a subnet")
|
||||
// .with_call_remote::<CliContext>(),
|
||||
// )
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ impl StartOSLogger {
|
||||
fn base_subscriber(logfile: LogFile) -> impl Subscriber {
|
||||
use tracing_error::ErrorLayer;
|
||||
use tracing_subscriber::prelude::*;
|
||||
use tracing_subscriber::{EnvFilter, fmt};
|
||||
use tracing_subscriber::{fmt, EnvFilter};
|
||||
|
||||
let filter_layer = || {
|
||||
EnvFilter::builder()
|
||||
@@ -80,10 +80,8 @@ impl StartOSLogger {
|
||||
|
||||
let sub = tracing_subscriber::registry();
|
||||
|
||||
#[cfg(feature = "unstable")]
|
||||
#[cfg(feature = "console-subscriber")]
|
||||
let sub = sub.with(console_subscriber::spawn());
|
||||
#[cfg(not(feature = "unstable"))]
|
||||
let sub = sub.with(filter_layer());
|
||||
|
||||
let sub = sub.with(fmt_layer).with(ErrorLayer::default());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user