Hi all,
Is it possible to change the location to which the ADL file endian converter writes its log files. In the Aerospace environment, writing logs into the ADL/logs directory is a no no.
Changing log location for ADL Endian Converter
Changing log location for ADL Endian Converter
Scott Houchin, Senior Engineering Specialist, The Aerospace Corporation
15049 Conference Center Dr CH3/310, Chantilly, VA 20151; 571-307-3914; scott.houchin@aero.org
15049 Conference Center Dr CH3/310, Chantilly, VA 20151; 571-307-3914; scott.houchin@aero.org
Re: Changing log location for ADL Endian Converter
Behind the scenes, the file endian convertor uses some of the ADL framework, though not all of it. It actually has an LW file located at $ADL_HOME/cfg/dynamic/noMetadata/AdlFileEndianConverterLwFile.xml. You should be able to change the <dbgPath> just like an algorithm.
The location of that LW file is hard code in $ADL_HOME/CMN/Utilities/FileEndianConverter/src/AdlFileEndianConverter.cpp to be $ADL_HOME/cfg/dynamic/noMetadata/AdlFileEndianConverterLwFile.xml, which is why you don't have to specify it.
If you change the log output path in the LW file, I see there's this line of code at about line 142:
Which would then be incorrect.
I will add that hard coded error message ("See the debug log in $ADL_HOME/log") to our list of issues. However, unless you think otherwise, it's not going to get patched right away as it seems minor.
The location of that LW file is hard code in $ADL_HOME/CMN/Utilities/FileEndianConverter/src/AdlFileEndianConverter.cpp to be $ADL_HOME/cfg/dynamic/noMetadata/AdlFileEndianConverterLwFile.xml, which is why you don't have to specify it.
If you change the log output path in the LW file, I see there's this line of code at about line 142:
Code: Select all
cout << "ERROR: conversion of " << argv[1]
<< " was not successful. See the debug log in $ADL_HOME/log." << endl;
I will add that hard coded error message ("See the debug log in $ADL_HOME/log") to our list of issues. However, unless you think otherwise, it's not going to get patched right away as it seems minor.
Kevin Bisanz
Raytheon Company
Raytheon Company
Re: Changing log location for ADL Endian Converter
Thanks for the info. This is indeed minor, so I'm not looking for a patch anytime soon.
Would I be able to use environment variables in the LW file?
In general, with anything in the Aerospace ADL front end, I am trying to tightly control the output of log files on a run by run basis, so I ultimately want to be able to control exactly where that file goes, and if needed determine exactly which log file went with which run. For the unpacker for example, I have modifed the cfg file such that the log file directory is specified entirely by an environment variable, which I then set as part of our front end right before the actual ADL code is run.
Would I be able to use environment variables in the LW file?
In general, with anything in the Aerospace ADL front end, I am trying to tightly control the output of log files on a run by run basis, so I ultimately want to be able to control exactly where that file goes, and if needed determine exactly which log file went with which run. For the unpacker for example, I have modifed the cfg file such that the log file directory is specified entirely by an environment variable, which I then set as part of our front end right before the actual ADL code is run.
Scott Houchin, Senior Engineering Specialist, The Aerospace Corporation
15049 Conference Center Dr CH3/310, Chantilly, VA 20151; 571-307-3914; scott.houchin@aero.org
15049 Conference Center Dr CH3/310, Chantilly, VA 20151; 571-307-3914; scott.houchin@aero.org
Re: Changing log location for ADL Endian Converter
You should be able to use environment variables. They *must* have curly braces though. Anything where a path is specified using ${ADL_HOME}, you should be able to use any environment variable(s).
In general, in any LW or CFG file where a path or file is already specified using ${ADL_HOME}, I *believe* you should be able to use any environment variable. For things that don't already use an environment variable, I'm not sure. You'll have to see what happens. I'm actually not sure if everything in an LW or CFG file is searched for an environment variable or if only certain ones are.
Let us know if you find something that doesn't seem to be working. Some paths may or may not be picky about the trailing directory slash. We've tried to fix the ones we know about.
In general, in any LW or CFG file where a path or file is already specified using ${ADL_HOME}, I *believe* you should be able to use any environment variable. For things that don't already use an environment variable, I'm not sure. You'll have to see what happens. I'm actually not sure if everything in an LW or CFG file is searched for an environment variable or if only certain ones are.
Let us know if you find something that doesn't seem to be working. Some paths may or may not be picky about the trailing directory slash. We've tried to fix the ones we know about.
Kevin Bisanz
Raytheon Company
Raytheon Company