Actually Show Logs
All checks were successful
Build and Test / nncs (push) Successful in 1m37s

This commit is contained in:
BloxerHD 2026-07-16 22:39:01 +01:00
commit 73526c08c4
Signed by: bloxerhd018
SSH key fingerprint: SHA256:ItSfcfhpXlfkMK3uQSDYW5X3XKm0hbHWQqWcCK57px8
2 changed files with 9 additions and 0 deletions

View file

@ -7,3 +7,4 @@ edition = "2024"
dotenvy = "0.15.7"
tokio = { version = "1.52.3", features = ["full"] }
tracing = "0.1.44"
tracing-subscriber = { version = "0.3.23", features = ["env-filter"] }

View file

@ -4,6 +4,7 @@ use std::env;
use dotenvy::dotenv;
use tokio::net::UdpSocket;
use tracing::{error, info};
use tracing_subscriber::{EnvFilter, fmt};
use crate::ipc::IpcFrame;
use crate::types::{Message, Sockets};
@ -105,6 +106,13 @@ fn init_port(socket: Arc<UdpSocket>, sockets: Arc<Sockets>) {
async fn main() -> Result<(), Box<dyn std::error::Error>> {
dotenv().ok();
fmt()
.with_env_filter(
EnvFilter::try_from_default_env()
.unwrap_or(EnvFilter::new("info")),
)
.init();
let sockets = Arc::new(Sockets{
primary: Arc::new(UdpSocket::bind("0.0.0.0:10025").await?),
secondary: Arc::new(UdpSocket::bind("0.0.0.0:10125").await?),