Fix logger without ui

This commit is contained in:
Asura 2022-09-13 06:19:08 -07:00
parent a8e501cb79
commit 7ffa407604
3 changed files with 6 additions and 3 deletions

2
Cargo.lock generated
View File

@ -3975,7 +3975,7 @@ dependencies = [
[[package]]
name = "rdev"
version = "0.5.0-2"
source = "git+https://github.com/asur4s/rdev#895c8fb1a6106714793e8877d35d2b7a1c57ce9c"
source = "git+https://github.com/asur4s/rdev#0ad53987fa6f0e37a7bc000358f71c3802de4e7c"
dependencies = [
"cocoa",
"core-foundation 0.9.3",

View File

@ -129,7 +129,7 @@ set(RUSTDESK_LIB_BUILD_TYPE $<IF:$<CONFIG:Debug>,debug,release>)
string(TOLOWER ${CMAKE_BUILD_TYPE} ${RUSTDESK_LIB_BUILD_TYPE})
message(STATUS "rustdesk lib build type: ${RUSTDESK_LIB_BUILD_TYPE}")
set(RUSTDESK_LIB "../build/linux/x64/${RUSTDESK_LIB_BUILD_TYPE}/liblibrustdesk.so")
set(RUSTDESK_LIB "../../target/${RUSTDESK_LIB_BUILD_TYPE}/liblibrustdesk.so")
install(FILES "${RUSTDESK_LIB}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime RENAME librustdesk.so)

View File

@ -1,6 +1,6 @@
use hbb_common::log;
use crate::{start_os_service, flutter::connection_manager, start_server};
use crate::{flutter::connection_manager, start_os_service, start_server};
/// Main entry of the RustDesk Core.
/// Return true if the app should continue running with UI(possibly Flutter), false if the app should exit.
@ -14,6 +14,9 @@ pub fn core_main() -> bool {
connection_manager::start_listen_ipc_thread();
return true;
}
use hbb_common::env_logger::*;
init_from_env(Env::default().filter_or(DEFAULT_FILTER_ENV, "info"));
if args[1] == "--service" {
log::info!("start --service");
start_os_service();