FAQ
| This is a
LIVE
service |
Changelog
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ews-coordinator
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gilligan Lab for Epidemiology and Modelling
Wheat rusts
ews-coordinator
Commits
e94de241
Commit
e94de241
authored
10 months ago
by
L. Bower
Browse files
Options
Downloads
Patches
Plain Diff
fixing default file paths
parent
757e96a7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
coordinator/utils/processor_utils.py
+2
-4
2 additions, 4 deletions
coordinator/utils/processor_utils.py
with
2 additions
and
4 deletions
coordinator/utils/processor_utils.py
+
2
−
4
View file @
e94de241
...
...
@@ -356,8 +356,7 @@ def setup_logging(job_file_path: str, is_live: bool, log_level: str):
# if there is no value set for the LOGGING_CONFIG file, set a default path.
if
not
'
LOGGING_CONFIG
'
in
os
.
environ
:
log_config_path_project
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"
../../../../../../media/scratch/lb584_scratch/projects/ews_local_prod/regions/EastAfrica/resources
"
,
"
configs
"
,
"
logger
"
,
"
template_log_config.json
"
)
log_config_path_project
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"
..
"
,
"
/configs
"
,
"
logger
"
,
"
template_log_config.json
"
)
print
(
f
"
ENVIRONMENT VARIABLE
'
LOGGING_CONFIG
'
IS NOT SET, UISING DEFAULT FILE -
{
log_config_path_project
}
"
)
else
:
log_config_path_project
=
os
.
environ
[
'
LOGGING_CONFIG
'
]
...
...
@@ -379,8 +378,7 @@ def setup_logging(job_file_path: str, is_live: bool, log_level: str):
# if there is no value set for the central project logger in the json file, set a default path.
if
not
log_config_dict
[
'
handlers
'
][
'
handler_project
'
][
'
filename
'
]:
# todo how does this work when there are several processors running at once, i.o. errors?
log_path_project
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"
../../../../../../media/scratch/lb584_scratch/projects/ews_local_prod/regions/EastAfrica/resources
"
,
"
configs
"
,
"
logger
"
,
"
log.txt
"
)
log_path_project
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"
..
"
,
"
configs
"
,
"
logger
"
,
"
log.txt
"
)
print
(
f
"'
HANDLER_PROJECT
'
HAS NO
'
FILENAME
'
SET TO SETTING TO
{
log_path_project
}
"
)
log_config_dict
[
'
handlers
'
][
'
handler_project
'
][
'
filename
'
]
=
log_path_project
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment