ansible:AnsibleModule.log()方法不会将任何内容打印到stdout/stderr

ansible:AnsibleModule.log()方法不会将任何内容打印到stdout/stderr,ansible,Ansible,我正在尝试编写一个自定义的ansible模块 在模块执行期间,我需要一些调试信息 但是,即使启用了最高详细级别(-vvv)和export-ANSIBLE\u DEBUG=true from ansible.module_utils.basic import AnsibleModule module.log(msg="some_message")) 我唯一能看到打印的msg是通过以下方法: module.exit_json(changed=True, msg=_msg) 需要强调的是,Ans

我正在尝试编写一个自定义的
ansible
模块

在模块执行期间,我需要一些调试信息

但是,即使启用了最高详细级别(
-vvv
)和
export-ANSIBLE\u DEBUG=true

from ansible.module_utils.basic import AnsibleModule

module.log(msg="some_message"))
我唯一能看到打印的
msg
是通过以下方法:

module.exit_json(changed=True, msg=_msg)

需要强调的是,
AnsibleModule.log()
将输出发送到
stout
stderr
。它会将其发送到默认的系统日志记录设施


在我的例子中,这是目标主机或部署程序主机上的
/var/log/syslog

?如何知道使用WSL2的默认系统日志功能