diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index a9866bfe72..a09749aca0 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -9,7 +9,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: diff --git a/README.md b/README.md index 4bc2e83264..ff42116f27 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Build dependencies - compiler with C++17 support - cmake>=3.12 - libboost>=1.74 - - libglog (optional) + - libglog>=0.7 (optional) - libleveldb - libmarisa - libopencc>=1.0.2 diff --git a/src/rime/setup.cc b/src/rime/setup.cc index 737ec0d0fa..bb29427764 100644 --- a/src/rime/setup.cc +++ b/src/rime/setup.cc @@ -84,7 +84,11 @@ RIME_API void SetupLogging(const char* app_name, // Do not allow other users to read/write log files created by current // process. FLAGS_logfile_mode = 0600; - google::InitGoogleLogging(app_name); + if (google::IsGoogleLoggingInitialized()) { + LOG(WARNING) << "Glog is already initialized."; + } else { + google::InitGoogleLogging(app_name); + } #endif // RIME_ENABLE_LOGGING }