Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OSUG
RESIF
ws-sacpz-resp
Commits
917d0440
Commit
917d0440
authored
Jun 08, 2020
by
Jerome Touvier
Committed by
Jerome Touvier
Jul 08, 2020
Browse files
remove config file
parent
490e96bb
Changes
5
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
917d0440
**/logs
**/__pycache__
stationxml-seed-converter-2.1.0.jar
apps/logging_config_dev.ini
deleted
100644 → 0
View file @
490e96bb
# List of loggers, handlers and formatters:
[loggers]
keys
=
root
[handlers]
#keys=consoleHandler, fileHandler
keys
=
consoleHandler
[formatters]
keys
=
generic, verbose
# loggers:
[logger_root]
level
=
DEBUG
#handlers=consoleHandler, fileHandler
handlers
=
consoleHandler
# handlers:
[handler_consoleHandler]
class
=
StreamHandler
level
=
DEBUG
formatter
=
generic
args
=
(sys.stdout,)
# formatters:
[formatter_generic]
#format=[%(asctime)s] %(levelname)s (%(process)d) [%(module)s:%(lineno)d] %(message)s
format
=
[%(asctime)s] %(levelname)s (%(process)d) [%(pathname)s:%(lineno)d] %(message)s
# datefmt='%Y-%m-%d %H:%M:%
[formatter_verbose]
format
=
[%(asctime)s] %(levelname)s (%(process)d) [%(pathname)s:%(lineno)d] %(message)s %(stack_info)s
config.py
deleted
100644 → 0
View file @
490e96bb
import
logging.config
import
os
def
set_env
():
try
:
logging
.
getLogger
(
"matplotlib"
).
setLevel
(
logging
.
WARNING
)
except
Exception
:
pass
# get RUNMODE environment variable
try
:
RUNMODE
=
os
.
environ
[
"RUNMODE"
]
except
Exception
:
print
(
"RUNMODE IS NOT DEFINED !"
)
return
False
try
:
# set logging config
CONFIG_FILE
=
"logging_config_dev.ini"
FILE_DIR
=
os
.
path
.
dirname
(
__file__
)
logging
.
config
.
fileConfig
(
os
.
path
.
join
(
FILE_DIR
,
"apps"
,
CONFIG_FILE
))
logging
.
debug
(
"RUNMODE = %s"
%
RUNMODE
)
return
True
except
Exception
as
ex
:
print
(
str
(
ex
))
return
False
start_resp.py
View file @
917d0440
from
flask
import
Flask
,
make_response
,
render_template
,
redirect
,
request
from
config
import
set_env
if
not
set_env
():
exit
(
1
)
from
apps.constants
import
VERSION
from
apps.root
import
output
...
...
start_sacpz.py
View file @
917d0440
from
flask
import
Flask
,
make_response
,
render_template
,
redirect
,
request
from
config
import
set_env
if
not
set_env
():
exit
(
1
)
from
apps.constants
import
VERSION
from
apps.root
import
output
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment