Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-video-pipeline
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-video-pipeline
Commits
5b8943eb
Unverified
Commit
5b8943eb
authored
Dec 13, 2017
by
M. Rehan
Committed by
GitHub
Dec 13, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #78 from edx/mrehan/fix-logging
Fix logging issues on production.
parents
cd0b4495
7ba2b28c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
VEDA/settings/utils.py
+4
-5
control/veda_val.py
+2
-2
No files found.
VEDA/settings/utils.py
View file @
5b8943eb
...
@@ -28,6 +28,8 @@ def get_logger_config(log_dir='/var/tmp',
...
@@ -28,6 +28,8 @@ def get_logger_config(log_dir='/var/tmp',
if
local_loglevel
not
in
[
'DEBUG'
,
'INFO'
,
'WARNING'
,
'ERROR'
,
'CRITICAL'
]:
if
local_loglevel
not
in
[
'DEBUG'
,
'INFO'
,
'WARNING'
,
'ERROR'
,
'CRITICAL'
]:
local_loglevel
=
'INFO'
local_loglevel
=
'INFO'
console_loglevel
=
'DEBUG'
if
debug
else
'INFO'
hostname
=
platform
.
node
()
.
split
(
"."
)[
0
]
hostname
=
platform
.
node
()
.
split
(
"."
)[
0
]
syslog_format
=
(
syslog_format
=
(
"[service_variant={service_variant}]"
"[service_variant={service_variant}]"
...
@@ -39,10 +41,7 @@ def get_logger_config(log_dir='/var/tmp',
...
@@ -39,10 +41,7 @@ def get_logger_config(log_dir='/var/tmp',
logging_env
=
logging_env
,
hostname
=
hostname
logging_env
=
logging_env
,
hostname
=
hostname
)
)
if
debug
:
handlers
=
[
'console'
,
'local'
]
handlers
=
[
'console'
]
else
:
handlers
=
[
'local'
]
logger_config
=
{
logger_config
=
{
'version'
:
1
,
'version'
:
1
,
...
@@ -62,7 +61,7 @@ def get_logger_config(log_dir='/var/tmp',
...
@@ -62,7 +61,7 @@ def get_logger_config(log_dir='/var/tmp',
},
},
'handlers'
:
{
'handlers'
:
{
'console'
:
{
'console'
:
{
'level'
:
'DEBUG'
if
debug
else
'INFO'
,
'level'
:
console_loglevel
,
'class'
:
'logging.StreamHandler'
,
'class'
:
'logging.StreamHandler'
,
'formatter'
:
'standard'
,
'formatter'
:
'standard'
,
'stream'
:
sys
.
stdout
,
'stream'
:
sys
.
stdout
,
...
...
control/veda_val.py
View file @
5b8943eb
...
@@ -9,8 +9,6 @@ import datetime
...
@@ -9,8 +9,6 @@ import datetime
import
yaml
import
yaml
from
VEDA.utils
import
get_config
from
VEDA.utils
import
get_config
LOGGER
=
logging
.
getLogger
(
__name__
)
requests
.
packages
.
urllib3
.
disable_warnings
()
requests
.
packages
.
urllib3
.
disable_warnings
()
...
@@ -36,6 +34,8 @@ Send data to VAL, either Video ID data or endpoint URLs
...
@@ -36,6 +34,8 @@ Send data to VAL, either Video ID data or endpoint URLs
from
control_env
import
*
from
control_env
import
*
from
control.veda_utils
import
ErrorObject
,
Output
from
control.veda_utils
import
ErrorObject
,
Output
LOGGER
=
logging
.
getLogger
(
__name__
)
class
VALAPICall
():
class
VALAPICall
():
...
...
Write
Preview
Markdown
is supported
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