mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-23 02:39:56 +00:00
pull in rust updates
This commit is contained in:
parent
0c98be8eff
commit
065823f71e
3 changed files with 9 additions and 11 deletions
|
@ -155,11 +155,11 @@ pub fn update_container(kind: *const c_char, enabled: bool, level: c_int) {
|
||||||
pub fn mainline_update_log_level(level: c_int) {
|
pub fn mainline_update_log_level(level: c_int) {
|
||||||
let containers = LOG_CONTAINERS
|
let containers = LOG_CONTAINERS
|
||||||
.get()
|
.get()
|
||||||
.expect("[dolphin_logger::update_container]: Attempting to get `LOG_CONTAINERS` before init");
|
.expect("[dolphin_logger::mainline_update_log_level]: Attempting to get `LOG_CONTAINERS` before init");
|
||||||
|
|
||||||
let mut writer = containers
|
let mut writer = containers
|
||||||
.write()
|
.write()
|
||||||
.expect("[dolphin_logger::update_container]: Unable to acquire write lock on `LOG_CONTAINERS`?");
|
.expect("[dolphin_logger::mainline_update_log_level]: Unable to acquire write lock on `LOG_CONTAINERS`?");
|
||||||
|
|
||||||
for container in (*writer).iter_mut() {
|
for container in (*writer).iter_mut() {
|
||||||
container.level = convert_dolphin_log_level_to_tracing_level(level);
|
container.level = convert_dolphin_log_level_to_tracing_level(level);
|
||||||
|
|
|
@ -47,12 +47,10 @@ pub struct GameReporterQueue {
|
||||||
impl GameReporterQueue {
|
impl GameReporterQueue {
|
||||||
/// Initializes and returns a new game reporter.
|
/// Initializes and returns a new game reporter.
|
||||||
pub(crate) fn new() -> Self {
|
pub(crate) fn new() -> Self {
|
||||||
// `max_idle_connections` is set to `0` to mimic how the CURL setup in the
|
// We set `max_idle_connections` to `5` to mimic how CURL was configured in
|
||||||
// C++ version was done - i.e, I don't want to introduce connection pooling
|
// the old C++ version of this module.
|
||||||
// without Fizzi/Nikki opting in to it.
|
|
||||||
let http_client = ureq::AgentBuilder::new()
|
let http_client = ureq::AgentBuilder::new()
|
||||||
//.https_only(true)
|
.max_idle_connections(5)
|
||||||
.max_idle_connections(0)
|
|
||||||
.user_agent("SlippiGameReporter/Rust v0.1")
|
.user_agent("SlippiGameReporter/Rust v0.1")
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
@ -103,10 +101,10 @@ impl GameReporterQueue {
|
||||||
|
|
||||||
match res {
|
match res {
|
||||||
Ok(value) if value == "true" => {
|
Ok(value) if value == "true" => {
|
||||||
tracing::info!(target: Log::GameReporter, "Successfully executed abandonment request")
|
tracing::info!(target: Log::GameReporter, "Successfully executed completion request")
|
||||||
},
|
},
|
||||||
Ok(value) => tracing::error!(target: Log::GameReporter, ?value, "Error executing abandonment request",),
|
Ok(value) => tracing::error!(target: Log::GameReporter, ?value, "Error executing completion request",),
|
||||||
Err(error) => tracing::error!(target: Log::GameReporter, ?error, "Error executing abandonment request"),
|
Err(error) => tracing::error!(target: Log::GameReporter, ?error, "Error executing completion request"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue