-
Notifications
You must be signed in to change notification settings - Fork 23.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The logging setup by utils.display only ever uses error/info log levels. #25761
Comments
I think that Ansible should be gradually refactored to use the standard Python logging method instead of the Current logging design (implementation) is crippled quite well, harcoded logging levels, impossible to define different logging levels for each destination and so on. My impression that that the Display() class is the root of all evil on Ansible logging issues... just one example: it does format the message before knowing where the message will be sent.... is like HTML before CSS was introduced ;) |
make ansible-playbook logging via ANSIBLE_LOG_PATH env variable. Unfortunately we cannot use a single ansible.cfg file in our playbooks directory due to ansible/ansible#11175 We cannot neither use plain ansible logger facility since it's just based on utils/display.py See: ansible/ansible#25761 (comment) Current log format is really poor, we have more details in the extra dicitonay but we are not writing it. There is no filtering at all for sensitive information. Change-Id: Idc9eb76ea295462e51ca32fd376946c15d44ef56 Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>
fixes ansible#25757, ansible#25758, ansible#25761 alternative to ansible#41859 and ansible#25765
* some logging fixes fixes ansible#25757, ansible#25758, ansible#25761 alternative to ansible#41859 and ansible#25765 * better color handling, courtesy of alikins
closed via #56311 |
SUMMARY
Any log records sent to the logger created in display only use error or info.
'warning' and 'debug' could be used for finer grained logs, especially if combined
with additional log handlers.
Additionally, the ansible specific verbosity levels could be mapped to custom log levels
('v', 'vvv', etc).
The additional verbosity levels ansible/display already use could be passed into display.display and/or its logger to allow finer grained log configuration.
ISSUE TYPE
COMPONENT NAME
lib/ansible/utils/display.py
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: