Date: Thursday, January 18, 2007 @ 17:25:12
Author: marc
Path: /cvsroot/carob/carob/src
Modified: Common.cpp (1.64 -> 1.65)
Do not use logWarn() in tryuserlocale() since it is called at static
initialization time (was segfaulting with log4cxx + incorrect LANG)
------------+
Common.cpp | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
Index: carob/src/Common.cpp
diff -u carob/src/Common.cpp:1.64 carob/src/Common.cpp:1.65
--- carob/src/Common.cpp:1.64 Thu Jan 18 16:48:54 2007
+++ carob/src/Common.cpp Thu Jan 18 17:25:12 2007
@@ -223,11 +223,13 @@
try {
return std::locale("");
} catch (std::runtime_error& ) {
- // FIXME: since this is static initialization time, log4cxx may
- // not have been initialized at this point
- CarobNS::logWarn(__WFILE__ L":tryuserlocale()",
- L"Missing user-preferred locale (check LANG). "
- "Falling back on current global locale.");
+
+ // Cannot use log4cxx logging functions here since they use the
+ // codec we are currently trying to initialize. Moreover log4cxx
+ // static may not have been yet initialized.
+ std::wcerr << __WFILE__ L":tryuserlocale(): "
+ L"Missing user-preferred locale (check LANG). "
+ "Falling back on current global locale." << std::endl;
return std::locale();
}
}
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits