1
0
mirror of https://github.com/haiwen/libsearpc.git synced 2025-07-30 20:44:40 +00:00

Set slow threshold when log to stdout (#74)

* Set slow threshold when log to stdout

* Adjust code

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
This commit is contained in:
feiniks 2025-01-18 14:50:13 +08:00 committed by GitHub
parent 36706a9f32
commit 0deb45d89f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -216,12 +216,13 @@ searpc_server_init_with_slow_log (RegisterMarshalFunc register_func,
g_warning ("Failed to open RPC slow log file %s: %s\n", slow_log_path, strerror(errno));
return -1;
}
slow_threshold = slow_threshold_in;
filtered_funcs = filtered_funcs_in;
pthread_mutex_init (&slow_log_lock, NULL);
}
slow_threshold = slow_threshold_in;
filtered_funcs = filtered_funcs_in;
pthread_mutex_init (&slow_log_lock, NULL);
searpc_server_init (register_func);
return 0;