Ask Your Question
0

Can not get the heat-engine INFO log in /var/log/heat/heat-engine.log, But can get the heat-api INFO log in /var/log/heat/heat-api.log

asked 2016-06-21 03:40:38 -0500

RobertCh gravatar image

updated 2016-06-21 21:26:30 -0500

Now I have only installed Heat and Keystone with Kilo version in my CentOS. And I am developing heat plugin to support myself resource type.

  1. when I reboot heat-engine service, I can not get the log like:

    INFO heat.engine.service [req-1a0436ba-fd4b-4423-aabd-ae3fb57143d1 - -] Service d2f810b7-8b59-48bf-887f-0ce2a36de018 is started

    Only have the log in /var/log/heat/heat-engine.log

    WARNING oslo_config.cfg [-] Option "stack_user_domain" from group "DEFAULT" is deprecated. Use option "stack_user_domain_id" from group "DEFAULT".

  2. when I reboot the heat-api service, I can get the below log in /var/log/heat/heat-api.log

    INFO heat.api [-] Starting Heat ReST API on 146.89.136.249:8004

In /etc/heat/heat.conf

verbose = True

Why the heat-engine service can not get the INFO level log, But the heat-api service can get the INFO level log ?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2016-07-07 01:48:12 -0500

RobertCh gravatar image

updated 2016-07-07 01:50:03 -0500

Find the root cause, Because in my heat plugin code, there is another logging system with my personal logging.conf,

part1: we invoke: logging.config.fileConfig(logfile_path), the function has default parameter disable_existing_loggers whose default value is 1, that will disable other loggers.

part2: In the process of logging.conf, that will revalue the handler of the logger root.
So I can not get the log in /var/log/heat/heat-engine.log

The solution:

  1. logging.config.fileConfig(logfile_path, disable_existing_loggers=0)

  2. comment the code replacing the handler of logger root with the handler in logging.conf

Thanks you all the same.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-06-21 03:40:38 -0500

Seen: 166 times

Last updated: Jul 07 '16