mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #12529 from soarpenguin/bug-fix
fix no self pointer out of class.
This commit is contained in:
commit
abfeb104df
1 changed files with 2 additions and 2 deletions
|
@ -45,8 +45,8 @@ debug_lock = Lock()
|
|||
#TODO: make this a logging callback instead
|
||||
if C.DEFAULT_LOG_PATH:
|
||||
path = C.DEFAULT_LOG_PATH
|
||||
if (os.path.exists(path) and not os.access(path, os.W_OK)) and not os.access(os.path.dirname(path), os.W_OK):
|
||||
self._display.warning("log file at %s is not writeable, aborting\n" % path)
|
||||
if (os.path.exists(path) and not os.access(path, os.W_OK)) or not os.access(os.path.dirname(path), os.W_OK):
|
||||
print("[WARNING]: log file at %s is not writeable, aborting\n" % path, file=sys.stderr)
|
||||
|
||||
logging.basicConfig(filename=path, level=logging.DEBUG, format='%(asctime)s %(name)s %(message)s')
|
||||
mypid = str(os.getpid())
|
||||
|
|
Loading…
Reference in a new issue