<description>The path to the default credential schema</description>
</variable>
- <variable id="api_debug" type="boolean">
+ <variable id="api_loglevel" type="int">
<name>Debug</name>
- <value>false</value>
- <description>Flag to turn debug on.</description>
+ <value>0</value>
+ <description>Logging level; 0=minimum, 1=info, 2=debug</description>
</variable>
<variable id="max_slice_renew" type="int">
'SFA_AGGREGATE_HOST', 'SFA_AGGREGATE_PORT',
'SFA_SM_HOST', 'SFA_SM_PORT',
'SFA_CM_ENABLED', 'SFA_CM_HOST', 'SFA_CM_PORT', 'SFA_CM_TYPE', 'SFA_CM_SLICE_PREFIX',
- 'SFA_API_DEBUG']
+ 'SFA_API_LOGLEVEL']
defaults = {
'SFA_CM_ENABLED': '1',
'SFA_CM_PORT': '12346',
'SFA_CM_SLICE_PREFIX': plc_config.PLC_SLICE_PREFIX,
'SFA_CM_TYPE': 'pl',
- 'SFA_API_DEBUG': '0'
+ 'SFA_API_LOGLEVEL': '0'
}
host_defaults = {
# Human readable name for this interface
SFA_INTERFACE_HRN="plc"
-# API Debug
-# Are we logging
-SFA_API_DEBUG=1
+# loglevel
+# How deep are we logging (0|1|2)
+SFA_API_LOGLEVEL=1
## ============================================================
# Registry Configuration
keys_filename = config.config_path + os.sep + 'person_keys.py'
sfaImporter = sfaImport()
logger=sfaImporter.logger
- if config.SFA_API_DEBUG: logger.setLevelDebug()
+ logger.setLevelFromOptVerbose(config.SFA_API_LOGLEVEL)
shell = sfaImporter.shell
# initialize registry db table
help="run component server", default=False)
parser.add_option("-t", "--trusted-certs", dest="trusted_certs", action="store_true",
help="refresh trusted certs", default=False)
- parser.add_option("-v", "--verbose", action="count", dest="verbose", default=0,
- help="verbose mode - cumulative")
parser.add_option("-d", "--daemon", dest="daemon", action="store_true",
help="Run as daemon.", default=False)
(options, args) = parser.parse_args()
config = Config()
- if config.SFA_API_DEBUG: pass
+ logger.setLevelFromOptVerbose(config.SFA_API_LOGLEVEL)
+
# ge the server's key and cert
hierarchy = Hierarchy()