Hi,
Using rfa8.2.1.L1.linux.rrg C++ on Linux, I have seen that the AppLogger log file is not generated correctly if the application is executed using the full path to the executable.
I have a ValueAdd Consumer application which configures application logging:
\Logger\AppLogger\fileLoggerEnabled = true \Logger\AppLogger\fileLoggerFilename = "{a}.rfa.log"
If I execute the application like this:
./TestConsumer
then the log file "TestConsumer.rfa.log" is created as expected.
But if I execute the application using the full path like this:
/the/path/to/the/application/TestConsumer
then either no log file is created, or occasionally a log file with a garbage name like
"ZZZZZZZZZZZZZZZZ\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ������������.rfa.log" is created.
Am I misconfiguring logging somehow, or is there another issue here?
If I run the application under valgrind
valgrind --tool=memcheck --track-origins=yes ./TestConsumer
no errors are reported, but if I run using the full path
valgrind --tool=memcheck --track-origins=yes /the/path/to/the/application/TestConsumer
then errors like this are reported (full output attached as valgrind-output.txt):
==1234== Conditional jump or move depends on uninitialised value(s) ==1234== at 0x56F1841: rfa::support::RFA_SearchAndReplace(int, int, char*&, int) (in lib/libRFA_Config.so) ==1234== by 0x56F1A7C: rfa::support::RFA_FormatOptionString(char const*, char*, unsigned int) (in lib/libRFA_Config.so) ==1234== by 0x56F1C7F: rfa::support::RFA_CreateDirectory(char const*, char*, unsigned int, bool) (in lib/libRFA_Config.so) ==1234== by 0x591BDC4: rfa::logger::FileLogAction::init(rfa::common::RFA_String const&, long) (in lib/libRFA_Logger.so) ==1234== by 0x591BFD3: rfa::logger::FileLogAction::FileLogAction(rfa::common::RFA_String const&, long) (in lib/libRFA_Logger.so) ==1234== by 0x591779E: rfa::logger::ApplicationLoggerImpl::ApplicationLoggerImpl(rfa::common::ComponentName const&, rfa::config::ConfigTree const*) (in lib/libRFA_Logger.so) ==1234== by 0x5917BFA: rfa::logger::ApplicationLoggerImpl::acquireImpl(rfa::common::RFA_String const&) (in lib/libRFA_Logger.so) ==1234== by 0x6315198: rfa::valueAdd::admin::AdminCore::init() (in lib/libRFA_ValueAdd.so) ==1234== by 0x63181DB: rfa::valueAdd::admin::ConsumerCore::initialize() (in lib/libRFA_ValueAdd.so) ==1234== by 0x404D72: main (TestConsumer.cpp:49) ==1234== Uninitialised value was created by a stack allocation ==1234== at 0x56F171C: rfa::support::RFA_SearchAndReplace(int, int, char*&, int) (in lib/libRFA_Config.so)