Filter out asn1_codecs warnings in rayhunter-daemon

...and make a small UI change so that folks won't get concerned about parsing errors.

Right now all the "undecoded extensions" noise goes into
rayhunter-daemon.log, and users get concerned about it when browsing
that through the UI.
This commit is contained in:
Markus Unterwaditzer
2026-02-03 11:42:28 +01:00
committed by Will Greenberg
parent 5b2cf3cec4
commit 1f171521e4
8 changed files with 17 additions and 47 deletions
Generated
+1 -35
View File
@@ -935,16 +935,6 @@ version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
[[package]]
name = "colored"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
dependencies = [
"lazy_static",
"windows-sys 0.59.0",
]
[[package]]
name = "combine"
version = "4.6.7"
@@ -3518,15 +3508,6 @@ dependencies = [
"syn 2.0.101",
]
[[package]]
name = "num_threads"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9"
dependencies = [
"libc",
]
[[package]]
name = "nusb"
version = "0.1.14"
@@ -4696,6 +4677,7 @@ dependencies = [
"chrono",
"crc",
"deku 0.20.2",
"env_logger 0.11.8",
"futures",
"libc",
"log",
@@ -4719,7 +4701,6 @@ dependencies = [
"log",
"pcap-file-tokio",
"rayhunter",
"simple_logger",
"tokio",
"walkdir",
]
@@ -4733,7 +4714,6 @@ dependencies = [
"async_zip",
"axum",
"chrono",
"env_logger 0.11.8",
"futures",
"futures-macro",
"image",
@@ -5434,18 +5414,6 @@ dependencies = [
"quote",
]
[[package]]
name = "simple_logger"
version = "5.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8c5dfa5e08767553704aa0ffd9d9794d527103c736aba9854773851fd7497eb"
dependencies = [
"colored",
"log",
"time",
"windows-sys 0.48.0",
]
[[package]]
name = "siphasher"
version = "0.3.11"
@@ -6095,9 +6063,7 @@ checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40"
dependencies = [
"deranged",
"itoa",
"libc",
"num-conv",
"num_threads",
"powerfmt",
"serde",
"time-core",
-1
View File
@@ -10,5 +10,4 @@ log = "0.4.20"
tokio = { version = "1.44.2", default-features = false, features = ["fs", "signal", "process", "rt-multi-thread"] }
pcap-file-tokio = "0.1.0"
clap = { version = "4.5.2", features = ["derive"] }
simple_logger = "5.0.0"
walkdir = "2.5.0"
+1 -8
View File
@@ -177,14 +177,7 @@ async fn main() {
} else {
log::LevelFilter::Info
};
simple_logger::SimpleLogger::new()
.with_colors(true)
.without_timestamps()
.with_level(level)
//Filter out a stupid massive amount of uneccesary warnings from hampi about undecoded extensions
.with_module_level("asn1_codecs", log::LevelFilter::Error)
.init()
.unwrap();
rayhunter::init_logging(level);
let harness = Harness::new_with_config(&AnalyzerConfig::default());
info!("Analyzers:");
-1
View File
@@ -18,7 +18,6 @@ axum = { version = "0.8", default-features = false, features = ["http1", "tokio"
thiserror = "1.0.52"
libc = "0.2.150"
log = "0.4.20"
env_logger = { version = "0.11", default-features = false }
tokio-util = { version = "0.7.10", features = ["rt", "io", "compat"] }
futures-macro = "0.3.30"
include_dir = "0.7.3"
+1 -1
View File
@@ -170,7 +170,7 @@ fn run_shutdown_thread(
#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<(), RayhunterError> {
env_logger::init();
rayhunter::init_logging(log::LevelFilter::Info);
#[cfg(feature = "rustcrypto-tls")]
{
@@ -78,7 +78,8 @@
<p class="text-lg underline">Unparsed Messages</p>
<p>
These are due to a limitation or bug in Rayhunter's parser, and aren't usually a
problem.
problem. We'll not accept bug reports about them unless something else is going wrong
(such as false-positives or definite false-negatives)
</p>
<div class="overflow-x-auto">
<table class="table-auto text-left">
+1
View File
@@ -16,6 +16,7 @@ crc = "3.0.1"
deku = { version = "0.20.0", features = ["logging"] }
libc = "0.2.150"
log = "0.4.20"
env_logger = { version = "0.11", default-features = false }
nix = { version = "0.29.0", features = ["feature"] }
pcap-file-tokio = "0.1.0"
pycrate-rs = { git = "https://github.com/EFForg/pycrate-rs" }
+11
View File
@@ -1,5 +1,16 @@
use serde::{Deserialize, Serialize};
/// Initialize logging with the given default level, suppressing noisy warnings
/// from hampi about undecoded ASN1 extensions. Respects `RUST_LOG` overrides.
pub fn init_logging(default_level: log::LevelFilter) {
env_logger::Builder::new()
.filter_level(default_level)
//Filter out a stupid massive amount of uneccessary warnings from hampi about undecoded extensions
.filter_module("asn1_codecs", log::LevelFilter::Error)
.parse_default_env()
.init();
}
pub mod analysis;
pub mod diag;
pub mod gsmtap;