Many users have run into issues when they did not enable logging in the C code (via the usr/user_config.h) file, but then try to use the Python logger class. Since the log command is not "installed", the Python code fails with no helpful error message.
TODO
Fix this by adding a helpful error message to the Python code.
For example, this pseudo-code could run at the beginning of each AMDC_Logger class public method to ensure embedded support:
if !logging_support_enabled:
resp = amdc.cmd("log")
if resp[2] == "UNKNOWN_CMD":
raise Exception("Logging capabilities are not enabled in the AMDC C code user config file")
else:
logging_support_enabled = True
and the logging_support_enabled would be a class property of the AMDC_Logger that starts as False
Many users have run into issues when they did not enable logging in the C code (via the
usr/user_config.h
) file, but then try to use the Python logger class. Since thelog
command is not "installed", the Python code fails with no helpful error message.TODO
Fix this by adding a helpful error message to the Python code.
For example, this pseudo-code could run at the beginning of each
AMDC_Logger
class public method to ensure embedded support:and the
logging_support_enabled
would be a class property of theAMDC_Logger
that starts asFalse