-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TH2-5212] added endpoint to request file by path (#5)
* added endpoint to request file by path * update description of request functions * update replacePathServerToLocal to raise Exception and remove unused endpoint * changed use data access from `ro` to `rw` * Corrected log configuration * added /files/all request and parsing for file path parameter * added `umask 0007` to `~/.bashrc` file --------- Co-authored-by: nikita.smirnov <[email protected]>
- Loading branch information
1 parent
9c110e3
commit e8def23
Showing
10 changed files
with
418 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
local-run/with-jupyter-notebook/json-stream-provider/log4py.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[loggers] | ||
keys=root | ||
|
||
[handlers] | ||
keys=consoleHandler | ||
|
||
[formatters] | ||
keys=formatter | ||
|
||
[logger_root] | ||
level=INFO | ||
handlers=consoleHandler | ||
|
||
[handler_consoleHandler] | ||
class=StreamHandler | ||
level=INFO | ||
formatter=formatter | ||
args=(sys.stdout,) | ||
|
||
[formatter_formatter] | ||
format=%(asctime)s.%(msecs)03d - %(name)s - %(levelname)s - %(message)s | ||
datefmt=%Y-%m-%d %H:%M:%S |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import logging.config | ||
import os | ||
|
||
log4py_file = '/var/th2/config/log4py.conf' | ||
def configureLogging(): | ||
if os.path.exists(log4py_file): | ||
logging.config.fileConfig(log4py_file, disable_existing_loggers=False) | ||
logging.getLogger(__name__).info(f'Logger is configured by {log4py_file} file') | ||
else: | ||
default_logging_config = { | ||
'version': 1, | ||
'formatters': { | ||
'default': { | ||
'format': '%(asctime)s.%(msecs)03d - %(name)s - %(levelname)s - %(message)s', | ||
'datefmt': '%Y-%m-%d %H:%M:%S' | ||
}, | ||
}, | ||
'handlers': { | ||
'console': { | ||
'class': 'logging.StreamHandler', | ||
'formatter': 'default', | ||
'level': 'DEBUG', | ||
'stream': 'ext://sys.stdout' | ||
}, | ||
}, | ||
'root': { | ||
'handlers': ['console'], | ||
'level': 'DEBUG', | ||
}, | ||
} | ||
logging.config.dictConfig(default_logging_config) | ||
logging.getLogger(__name__).info('Logger is configured by default') | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"package_name": "th2-json-stream-provider", | ||
"package_version": "0.0.4" | ||
"package_version": "0.0.5" | ||
} |
Oops, something went wrong.