mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 12:15:34 +08:00
Fix log instance mismatch
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
|
|
||||||
#include "log.h"
|
#include "rd_log.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <Winsock2.h>
|
#include <Winsock2.h>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "mouse_controller.h"
|
#include "mouse_controller.h"
|
||||||
|
|
||||||
#include "log.h"
|
#include "rd_log.h"
|
||||||
|
|
||||||
MouseController::MouseController() {}
|
MouseController::MouseController() {}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "log.h"
|
#include "rd_log.h"
|
||||||
#include "render.h"
|
#include "render.h"
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
|
|||||||
@@ -24,8 +24,8 @@
|
|||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
#include "imgui_impl_sdl2.h"
|
#include "imgui_impl_sdl2.h"
|
||||||
#include "imgui_impl_sdlrenderer2.h"
|
#include "imgui_impl_sdlrenderer2.h"
|
||||||
#include "log.h"
|
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
|
#include "rd_log.h"
|
||||||
#include "screen_capturer_factory.h"
|
#include "screen_capturer_factory.h"
|
||||||
|
|
||||||
#define NV12_BUFFER_SIZE 1280 * 720 * 3 / 2
|
#define NV12_BUFFER_SIZE 1280 * 720 * 3 / 2
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
#ifndef _LOG_H_
|
/*
|
||||||
#define _LOG_H_
|
* @Author: DI JUNKUN
|
||||||
|
* @Date: 2024-07-17
|
||||||
|
* Copyright (c) 2024 by DI JUNKUN, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _RD_LOG_H_
|
||||||
|
#define _RD_LOG_H_
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
@@ -18,18 +24,7 @@ using namespace std::chrono;
|
|||||||
|
|
||||||
#define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_INFO
|
#define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_INFO
|
||||||
|
|
||||||
// SPDLOG_TRACE(...)
|
constexpr auto LOGGER_NAME = "rd";
|
||||||
// SPDLOG_DEBUG(...)
|
|
||||||
// SPDLOG_INFO(...)
|
|
||||||
// SPDLOG_WARN(...)
|
|
||||||
// SPDLOG_ERROR(...)
|
|
||||||
// SPDLOG_CRITICAL(...)
|
|
||||||
|
|
||||||
#ifdef SIGNAL_LOGGER
|
|
||||||
constexpr auto LOGGER_NAME = "siganl_server";
|
|
||||||
#else
|
|
||||||
constexpr auto LOGGER_NAME = "remote_desk";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define LOG_INFO(...) \
|
#define LOG_INFO(...) \
|
||||||
if (nullptr == spdlog::get(LOGGER_NAME)) { \
|
if (nullptr == spdlog::get(LOGGER_NAME)) { \
|
||||||
@@ -124,4 +119,4 @@ constexpr auto LOGGER_NAME = "remote_desk";
|
|||||||
SPDLOG_LOGGER_CRITICAL(spdlog::get(LOGGER_NAME), __VA_ARGS__); \
|
SPDLOG_LOGGER_CRITICAL(spdlog::get(LOGGER_NAME), __VA_ARGS__); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -7,8 +7,8 @@
|
|||||||
#include "device_controller_factory.h"
|
#include "device_controller_factory.h"
|
||||||
#include "layout_style.h"
|
#include "layout_style.h"
|
||||||
#include "localization.h"
|
#include "localization.h"
|
||||||
#include "log.h"
|
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
|
#include "rd_log.h"
|
||||||
#include "screen_capturer_factory.h"
|
#include "screen_capturer_factory.h"
|
||||||
|
|
||||||
// Refresh Event
|
// Refresh Event
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "layout_style.h"
|
#include "layout_style.h"
|
||||||
#include "localization.h"
|
#include "localization.h"
|
||||||
#include "log.h"
|
#include "rd_log.h"
|
||||||
#include "render.h"
|
#include "render.h"
|
||||||
|
|
||||||
int Render::ConnectionStatusWindow() {
|
int Render::ConnectionStatusWindow() {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "IconsFontAwesome6.h"
|
#include "IconsFontAwesome6.h"
|
||||||
#include "layout_style.h"
|
#include "layout_style.h"
|
||||||
#include "localization.h"
|
#include "localization.h"
|
||||||
#include "log.h"
|
#include "rd_log.h"
|
||||||
#include "render.h"
|
#include "render.h"
|
||||||
|
|
||||||
int Render::ControlBar() {
|
int Render::ControlBar() {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
#include "IconsFontAwesome6.h"
|
#include "IconsFontAwesome6.h"
|
||||||
#include "layout_style.h"
|
#include "layout_style.h"
|
||||||
#include "localization.h"
|
#include "localization.h"
|
||||||
#include "log.h"
|
#include "rd_log.h"
|
||||||
#include "render.h"
|
#include "render.h"
|
||||||
|
|
||||||
int Render::LocalWindow() {
|
int Render::LocalWindow() {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#include "IconsFontAwesome6.h"
|
#include "IconsFontAwesome6.h"
|
||||||
#include "log.h"
|
#include "rd_log.h"
|
||||||
#include "render.h"
|
#include "render.h"
|
||||||
|
|
||||||
int Render::MenuWindow() {
|
int Render::MenuWindow() {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "IconsFontAwesome6.h"
|
#include "IconsFontAwesome6.h"
|
||||||
#include "layout_style.h"
|
#include "layout_style.h"
|
||||||
#include "localization.h"
|
#include "localization.h"
|
||||||
#include "log.h"
|
#include "rd_log.h"
|
||||||
#include "render.h"
|
#include "render.h"
|
||||||
|
|
||||||
int Render::RemoteWindow() {
|
int Render::RemoteWindow() {
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
#include "fa-solid-900.h"
|
#include "fa-solid-900.h"
|
||||||
#include "layout_style.h"
|
#include "layout_style.h"
|
||||||
#include "localization.h"
|
#include "localization.h"
|
||||||
#include "log.h"
|
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
|
#include "rd_log.h"
|
||||||
#include "screen_capturer_factory.h"
|
#include "screen_capturer_factory.h"
|
||||||
|
|
||||||
// Refresh Event
|
// Refresh Event
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "IconsFontAwesome6.h"
|
#include "IconsFontAwesome6.h"
|
||||||
#include "layout_style.h"
|
#include "layout_style.h"
|
||||||
#include "localization.h"
|
#include "localization.h"
|
||||||
#include "log.h"
|
#include "rd_log.h"
|
||||||
#include "render.h"
|
#include "render.h"
|
||||||
|
|
||||||
int Render::SettingButton() {
|
int Render::SettingButton() {
|
||||||
|
|||||||
2
thirdparty/projectx
vendored
2
thirdparty/projectx
vendored
Submodule thirdparty/projectx updated: 28fb35faf5...792a286899
18
xmake.lua
18
xmake.lua
@@ -45,21 +45,21 @@ add_packages("spdlog", "imgui")
|
|||||||
|
|
||||||
includes("thirdparty")
|
includes("thirdparty")
|
||||||
|
|
||||||
target("log")
|
target("rd_log")
|
||||||
set_kind("object")
|
set_kind("object")
|
||||||
add_packages("spdlog")
|
add_packages("spdlog")
|
||||||
add_headerfiles("src/log/log.h")
|
add_headerfiles("src/log/rd_log.h")
|
||||||
add_includedirs("src/log", {public = true})
|
add_includedirs("src/log", {public = true})
|
||||||
|
|
||||||
target("common")
|
target("common")
|
||||||
set_kind("object")
|
set_kind("object")
|
||||||
add_deps("log")
|
add_deps("rd_log")
|
||||||
add_files("src/common/*.cpp")
|
add_files("src/common/*.cpp")
|
||||||
add_includedirs("src/common", {public = true})
|
add_includedirs("src/common", {public = true})
|
||||||
|
|
||||||
target("screen_capturer")
|
target("screen_capturer")
|
||||||
set_kind("object")
|
set_kind("object")
|
||||||
add_deps("log")
|
add_deps("rd_log")
|
||||||
add_packages("libyuv")
|
add_packages("libyuv")
|
||||||
add_includedirs("src/screen_capturer", {public = true})
|
add_includedirs("src/screen_capturer", {public = true})
|
||||||
if is_os("windows") then
|
if is_os("windows") then
|
||||||
@@ -77,7 +77,7 @@ target("screen_capturer")
|
|||||||
|
|
||||||
target("device_controller")
|
target("device_controller")
|
||||||
set_kind("object")
|
set_kind("object")
|
||||||
add_deps("log")
|
add_deps("rd_log")
|
||||||
add_includedirs("src/device_controller", {public = true})
|
add_includedirs("src/device_controller", {public = true})
|
||||||
if is_os("windows") then
|
if is_os("windows") then
|
||||||
add_files("src/device_controller/mouse/windows/*.cpp")
|
add_files("src/device_controller/mouse/windows/*.cpp")
|
||||||
@@ -92,7 +92,7 @@ target("device_controller")
|
|||||||
|
|
||||||
target("config_center")
|
target("config_center")
|
||||||
set_kind("object")
|
set_kind("object")
|
||||||
add_deps("log")
|
add_deps("rd_log")
|
||||||
add_files("src/config_center/*.cpp")
|
add_files("src/config_center/*.cpp")
|
||||||
add_includedirs("src/config_center", {public = true})
|
add_includedirs("src/config_center", {public = true})
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ target("localization")
|
|||||||
|
|
||||||
target("original_version")
|
target("original_version")
|
||||||
set_kind("object")
|
set_kind("object")
|
||||||
add_deps("log", "common", "localization", "config_center", "projectx", "screen_capturer", "device_controller")
|
add_deps("rd_log", "common", "localization", "config_center", "projectx", "screen_capturer", "device_controller")
|
||||||
if is_os("macosx") then
|
if is_os("macosx") then
|
||||||
add_packages("ffmpeg")
|
add_packages("ffmpeg")
|
||||||
elseif is_os("linux") then
|
elseif is_os("linux") then
|
||||||
@@ -113,7 +113,7 @@ target("original_version")
|
|||||||
|
|
||||||
target("single_window")
|
target("single_window")
|
||||||
set_kind("object")
|
set_kind("object")
|
||||||
add_deps("log", "common", "localization", "config_center", "projectx", "screen_capturer", "device_controller")
|
add_deps("rd_log", "common", "localization", "config_center", "projectx", "screen_capturer", "device_controller")
|
||||||
if is_os("macosx") then
|
if is_os("macosx") then
|
||||||
add_packages("ffmpeg")
|
add_packages("ffmpeg")
|
||||||
elseif is_os("linux") then
|
elseif is_os("linux") then
|
||||||
@@ -125,7 +125,7 @@ target("single_window")
|
|||||||
|
|
||||||
target("remote_desk")
|
target("remote_desk")
|
||||||
set_kind("binary")
|
set_kind("binary")
|
||||||
add_deps("log", "common", "single_window")
|
add_deps("rd_log", "common", "single_window")
|
||||||
if is_os("macosx") then
|
if is_os("macosx") then
|
||||||
add_packages("ffmpeg")
|
add_packages("ffmpeg")
|
||||||
elseif is_os("linux") then
|
elseif is_os("linux") then
|
||||||
|
|||||||
Reference in New Issue
Block a user