Merge "New location of the default log directory."
This commit is contained in:
commit
35f34ffdab
@ -30,17 +30,16 @@ DOCUMENTATION = '''
|
|||||||
version_added: "1.0"
|
version_added: "1.0"
|
||||||
description:
|
description:
|
||||||
- This callback converts all events into a JSON file
|
- This callback converts all events into a JSON file
|
||||||
stored in /var/log/validations
|
stored in the selected validations logging directory,
|
||||||
|
as defined by the $VALIDATIONS_LOG_DIR env variable,
|
||||||
|
or the $HOME/validations by default.
|
||||||
type: aggregate
|
type: aggregate
|
||||||
requirements: None
|
requirements: None
|
||||||
'''
|
'''
|
||||||
|
|
||||||
VALIDATIONS_LOG_DIR = (os.getenv('VALIDATIONS_LOG_DIR')
|
VALIDATIONS_LOG_DIR = os.environ.get(
|
||||||
if os.getenv('VALIDATIONS_LOG_DIR') else
|
'VALIDATIONS_LOG_DIR',
|
||||||
('/var/log/validations'
|
os.environ.get('HOME'))
|
||||||
if os.path.exists('/var/log/validations')
|
|
||||||
and os.access('/var/log/validations', os.W_OK) else
|
|
||||||
os.environ.get('PWD')))
|
|
||||||
|
|
||||||
|
|
||||||
def current_time():
|
def current_time():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user