summaryrefslogtreecommitdiffstats
path: root/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0005-add-env-for-log4cxx-properties-path.patch
diff options
context:
space:
mode:
authorToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
committerToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
commit5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch)
treeb4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0005-add-env-for-log4cxx-properties-path.patch
parent706ad73eb02caf8532deaf5d38995bd258725cb8 (diff)
agl-basesystem
Diffstat (limited to 'external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0005-add-env-for-log4cxx-properties-path.patch')
-rw-r--r--external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0005-add-env-for-log4cxx-properties-path.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0005-add-env-for-log4cxx-properties-path.patch b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0005-add-env-for-log4cxx-properties-path.patch
new file mode 100644
index 00000000..75d43906
--- /dev/null
+++ b/external/meta-sdl/recipes-automotive/sdl-core/sdl-core/0005-add-env-for-log4cxx-properties-path.patch
@@ -0,0 +1,36 @@
+From 570405af8e5c874db1852bdfb333ec0c941093ac Mon Sep 17 00:00:00 2001
+From: Phong Tran <tranmanphong@gmail.com>
+Date: Sun, 12 Feb 2017 16:54:48 +0700
+Subject: [PATCH 05/10] add env for log4cxx properties path
+
+Add the env variable SDL_LOG4CXX_PROPERTIES_FILE
+to indicate the path of log4cxx configure file.
+
+%% original patch: 0005-add-env-for-log4cxx-properties-path.patch
+---
+ src/appMain/main.cc | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/src/appMain/main.cc b/src/appMain/main.cc
+index feb5b58..08e65f7 100644
+--- a/src/appMain/main.cc
++++ b/src/appMain/main.cc
+@@ -112,8 +112,13 @@ int32_t main(int32_t argc, char** argv) {
+
+ // --------------------------------------------------------------------------
+ // Logger initialization
+- INIT_LOGGER("log4cxx.properties", profile_instance.logs_enabled());
+-
++ const char* log4cxx_path = getenv("SDL_LOG4CXX_PROPERTIES_FILE");
++ if (!log4cxx_path) {
++ INIT_LOGGER("log4cxx.properties", profile_instance.logs_enabled());
++ } else {
++ std::string log4cxx_properties = std::string(log4cxx_path);
++ INIT_LOGGER(log4cxx_properties, profile_instance.logs_enabled());
++ }
+ threads::Thread::SetNameForId(threads::Thread::CurrentId(), "MainThread");
+
+ if (!utils::appenders_loader.Loaded()) {
+--
+2.7.4
+