mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-12-25 07:19:26 -05:00
fix tests
This commit is contained in:
parent
ef6ecdab79
commit
ad45660db9
@ -710,7 +710,7 @@ impl Network {
|
||||
self.unlocked_inner
|
||||
.interfaces
|
||||
.with_interfaces(|interfaces| {
|
||||
debug!("interfaces: {:#?}", interfaces);
|
||||
log_net!(debug "interfaces: {:#?}", interfaces);
|
||||
|
||||
for intf in interfaces.values() {
|
||||
// Skip networks that we should never encounter
|
||||
|
@ -268,7 +268,7 @@ impl Network {
|
||||
}
|
||||
}
|
||||
|
||||
debug!("spawn_socket_listener: binding successful to {}", addr);
|
||||
log_net!(debug "spawn_socket_listener: binding successful to {}", addr);
|
||||
|
||||
// Create protocol handler records
|
||||
let listener_state = Arc::new(RwLock::new(ListenerState::new()));
|
||||
|
@ -17,14 +17,14 @@ impl Network {
|
||||
}
|
||||
trace!("task_count: {}", task_count);
|
||||
for _ in 0..task_count {
|
||||
trace!("Spawning UDP listener task");
|
||||
log_net!("Spawning UDP listener task");
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Run thread task to process stream of messages
|
||||
let this = self.clone();
|
||||
|
||||
let jh = spawn(async move {
|
||||
trace!("UDP listener task spawned");
|
||||
log_net!("UDP listener task spawned");
|
||||
|
||||
// Collect all our protocol handlers into a vector
|
||||
let mut protocol_handlers: Vec<RawUdpProtocolHandler> = this
|
||||
|
@ -8,7 +8,7 @@ use super::*;
|
||||
impl StorageManager {
|
||||
pub(crate) fn setup_tasks(&self) {
|
||||
// Set flush records tick task
|
||||
debug!("starting flush record stores task");
|
||||
log_stor!(debug "starting flush record stores task");
|
||||
{
|
||||
let this = self.clone();
|
||||
self.unlocked_inner
|
||||
@ -29,7 +29,7 @@ impl StorageManager {
|
||||
});
|
||||
}
|
||||
// Set offline subkey writes tick task
|
||||
debug!("starting offline subkey writes task");
|
||||
log_stor!(debug "starting offline subkey writes task");
|
||||
{
|
||||
let this = self.clone();
|
||||
self.unlocked_inner
|
||||
@ -50,7 +50,7 @@ impl StorageManager {
|
||||
});
|
||||
}
|
||||
// Set send value changes tick task
|
||||
debug!("starting send value changes task");
|
||||
log_stor!(debug "starting send value changes task");
|
||||
{
|
||||
let this = self.clone();
|
||||
self.unlocked_inner
|
||||
@ -71,7 +71,7 @@ impl StorageManager {
|
||||
});
|
||||
}
|
||||
// Set check active watches tick task
|
||||
debug!("starting check active watches task");
|
||||
log_stor!(debug "starting check active watches task");
|
||||
{
|
||||
let this = self.clone();
|
||||
self.unlocked_inner
|
||||
@ -117,19 +117,19 @@ impl StorageManager {
|
||||
}
|
||||
|
||||
pub(crate) async fn cancel_tasks(&self) {
|
||||
debug!("stopping check active watches task");
|
||||
log_stor!(debug "stopping check active watches task");
|
||||
if let Err(e) = self.unlocked_inner.check_active_watches_task.stop().await {
|
||||
warn!("check_active_watches_task not stopped: {}", e);
|
||||
}
|
||||
debug!("stopping send value changes task");
|
||||
log_stor!(debug "stopping send value changes task");
|
||||
if let Err(e) = self.unlocked_inner.send_value_changes_task.stop().await {
|
||||
warn!("send_value_changes_task not stopped: {}", e);
|
||||
}
|
||||
debug!("stopping flush record stores task");
|
||||
log_stor!(debug "stopping flush record stores task");
|
||||
if let Err(e) = self.unlocked_inner.flush_record_stores_task.stop().await {
|
||||
warn!("flush_record_stores_task not stopped: {}", e);
|
||||
}
|
||||
debug!("stopping offline subkey writes task");
|
||||
log_stor!(debug "stopping offline subkey writes task");
|
||||
if let Err(e) = self.unlocked_inner.offline_subkey_writes_task.stop().await {
|
||||
warn!("offline_subkey_writes_task not stopped: {}", e);
|
||||
}
|
||||
|
@ -27,21 +27,26 @@ logging:
|
||||
system:
|
||||
enabled: false
|
||||
level: 'info'
|
||||
ignore_log_targets: []
|
||||
terminal:
|
||||
enabled: true
|
||||
level: 'info'
|
||||
ignore_log_targets: []
|
||||
file:
|
||||
enabled: false
|
||||
path: ''
|
||||
append: true
|
||||
level: 'info'
|
||||
ignore_log_targets: []
|
||||
api:
|
||||
enabled: true
|
||||
level: 'info'
|
||||
ignore_log_targets: []
|
||||
otlp:
|
||||
enabled: false
|
||||
level: 'trace'
|
||||
grpc_endpoint: 'localhost:4317'
|
||||
ignore_log_targets: []
|
||||
console:
|
||||
enabled: false
|
||||
testing:
|
||||
@ -922,17 +927,22 @@ impl Settings {
|
||||
set_config_value!(inner.auto_attach, value);
|
||||
set_config_value!(inner.logging.system.enabled, value);
|
||||
set_config_value!(inner.logging.system.level, value);
|
||||
set_config_value!(inner.logging.system.ignore_log_targets, value);
|
||||
set_config_value!(inner.logging.terminal.enabled, value);
|
||||
set_config_value!(inner.logging.terminal.level, value);
|
||||
set_config_value!(inner.logging.terminal.ignore_log_targets, value);
|
||||
set_config_value!(inner.logging.file.enabled, value);
|
||||
set_config_value!(inner.logging.file.path, value);
|
||||
set_config_value!(inner.logging.file.append, value);
|
||||
set_config_value!(inner.logging.file.level, value);
|
||||
set_config_value!(inner.logging.file.ignore_log_targets, value);
|
||||
set_config_value!(inner.logging.api.enabled, value);
|
||||
set_config_value!(inner.logging.api.level, value);
|
||||
set_config_value!(inner.logging.api.ignore_log_targets, value);
|
||||
set_config_value!(inner.logging.otlp.enabled, value);
|
||||
set_config_value!(inner.logging.otlp.level, value);
|
||||
set_config_value!(inner.logging.otlp.grpc_endpoint, value);
|
||||
set_config_value!(inner.logging.otlp.ignore_log_targets, value);
|
||||
set_config_value!(inner.logging.console.enabled, value);
|
||||
set_config_value!(inner.testing.subnode_index, value);
|
||||
set_config_value!(inner.core.capabilities.disable, value);
|
||||
|
@ -42,8 +42,10 @@ impl VeilidClient {
|
||||
|
||||
// Performance logger
|
||||
if platformConfig.logging.performance.enabled {
|
||||
let filter =
|
||||
veilid_core::VeilidLayerFilter::new(platformConfig.logging.performance.level, None);
|
||||
let filter = veilid_core::VeilidLayerFilter::new(
|
||||
platformConfig.logging.performance.level,
|
||||
&platformConfig.logging.performance.ignore_log_targets,
|
||||
);
|
||||
let layer = WASMLayer::new(
|
||||
WASMLayerConfigBuilder::new()
|
||||
.set_report_logs_in_timings(platformConfig.logging.performance.logs_in_timings)
|
||||
@ -61,8 +63,10 @@ impl VeilidClient {
|
||||
|
||||
// API logger
|
||||
if platformConfig.logging.api.enabled {
|
||||
let filter =
|
||||
veilid_core::VeilidLayerFilter::new(platformConfig.logging.api.level, None);
|
||||
let filter = veilid_core::VeilidLayerFilter::new(
|
||||
platformConfig.logging.api.level,
|
||||
&platformConfig.logging.api.ignore_log_targets,
|
||||
);
|
||||
let layer = veilid_core::ApiTracingLayer::get().with_filter(filter.clone());
|
||||
filters.insert("api", filter);
|
||||
layers.push(layer.boxed());
|
||||
|
@ -5,12 +5,14 @@ export const veilidCoreInitConfig: VeilidWASMConfig = {
|
||||
api: {
|
||||
enabled: true,
|
||||
level: 'Debug',
|
||||
ignore_log_targets: [],
|
||||
},
|
||||
performance: {
|
||||
enabled: false,
|
||||
level: 'Info',
|
||||
logs_in_timings: false,
|
||||
logs_in_console: false,
|
||||
ignore_log_targets: [],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user