You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_lock_dir = '.lock'
if os.path.exists(_lock_dir):
pass
else:
os.mkdir(_lock_dir)
when I import mlogging , it will mkdir in current path;
if it has no Permission,
will raise OSError: [Errno 13] Permission denied: '.lock'
why not use absolutePath like '/tmp/.lock'
The text was updated successfully, but these errors were encountered:
I'm very glad to see that someone using the mlogging module.
Put the .lock into the pwd is to avoid the conflict if you put the .lock into the /tmp when you run two process use the mlogging.
Thanks for answer
two process? do you meaning two diffirent log files in same name?
lock is only for the log file, if use the log file's absolute path or path's hash, it will not repeated
by the way, when permission is given, the program run in daemon has problem too, because the pwd will changed to root path, if still use relative path, you should fix it
Hope better solution
following code in init.py
_lock_dir = '.lock'
if os.path.exists(_lock_dir):
pass
else:
os.mkdir(_lock_dir)
when I import mlogging , it will mkdir in current path;
if it has no Permission,
will raise OSError: [Errno 13] Permission denied: '.lock'
why not use absolutePath like '/tmp/.lock'
The text was updated successfully, but these errors were encountered: