Parse logLevel from /etc/qmemman.conf
This commit is contained in:
parent
9571765b4c
commit
c9a0f4ea66
@ -11,3 +11,7 @@ dom0-mem-boost = 350M
|
|||||||
# cache-margin-factor - calculate VM preferred memory as (used memory)*cache-margin-factor
|
# cache-margin-factor - calculate VM preferred memory as (used memory)*cache-margin-factor
|
||||||
# Default: 1.3
|
# Default: 1.3
|
||||||
cache-margin-factor = 1.3
|
cache-margin-factor = 1.3
|
||||||
|
|
||||||
|
# log-level - Warning 30, Info 20, Debug 10
|
||||||
|
# Default: 30
|
||||||
|
log-level = 30
|
||||||
|
@ -250,8 +250,6 @@ def main():
|
|||||||
|
|
||||||
sys.stdin.close()
|
sys.stdin.close()
|
||||||
|
|
||||||
logging.root.setLevel(parser.get_loglevel_from_verbosity(args))
|
|
||||||
|
|
||||||
log = logging.getLogger('qmemman.daemon')
|
log = logging.getLogger('qmemman.daemon')
|
||||||
|
|
||||||
config = configparser.SafeConfigParser({
|
config = configparser.SafeConfigParser({
|
||||||
@ -268,6 +266,8 @@ def main():
|
|||||||
qubes.utils.parse_size(config.get('global', 'dom0-mem-boost'))
|
qubes.utils.parse_size(config.get('global', 'dom0-mem-boost'))
|
||||||
qubes.qmemman.algo.CACHE_FACTOR = \
|
qubes.qmemman.algo.CACHE_FACTOR = \
|
||||||
config.getfloat('global', 'cache-margin-factor')
|
config.getfloat('global', 'cache-margin-factor')
|
||||||
|
loglevel = config.getint('global', 'log-level')
|
||||||
|
logging.root.setLevel(loglevel)
|
||||||
|
|
||||||
log.info('MIN_PREFMEM={algo.MIN_PREFMEM}'
|
log.info('MIN_PREFMEM={algo.MIN_PREFMEM}'
|
||||||
' DOM0_MEM_BOOST={algo.DOM0_MEM_BOOST}'
|
' DOM0_MEM_BOOST={algo.DOM0_MEM_BOOST}'
|
||||||
|
Loading…
Reference in New Issue
Block a user