Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
63cb53c9
Commit
63cb53c9
authored
13 years ago
by
David Ormsbee
Browse files
Options
Downloads
Patches
Plain Diff
Move logging config, add tracking info to console, remove logging tests.
parent
98efb8c0
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
courseware/views.py
+0
-4
0 additions, 4 deletions
courseware/views.py
settings_new_askbot.py
+91
-81
91 additions, 81 deletions
settings_new_askbot.py
with
91 additions
and
85 deletions
courseware/views.py
+
0
−
4
View file @
63cb53c9
...
...
@@ -35,10 +35,6 @@ def profile(request):
if
not
request
.
user
.
is_authenticated
():
return
redirect
(
'
/
'
)
log
.
info
(
"
Profile called
"
)
logging
.
info
(
"
Now the root
"
)
logging
.
getLogger
(
"
tracking
"
).
info
(
"
this should be unformatted
"
)
dom
=
content_parser
.
course_file
(
request
.
user
)
hw
=
[]
course
=
dom
.
xpath
(
'
//course/@name
'
)[
0
]
...
...
This diff is collapsed.
Click to expand it.
settings_new_askbot.py
+
91
−
81
View file @
63cb53c9
...
...
@@ -56,87 +56,6 @@ USE_I18N = True
# calendars according to the current locale
USE_L10N
=
True
# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error.
# See http://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging configuration.
LOGGING
=
{
'
version
'
:
1
,
'
disable_existing_loggers
'
:
True
,
'
formatters
'
:
{
'
standard
'
:
{
'
format
'
:
'
%(levelname)s %(asctime)s PID:%(process)d %(name)s %(filename)s:%(lineno)d %(message)s
'
,
},
'
raw
'
:
{
'
format
'
:
'
%(message)s
'
,
}
},
'
handlers
'
:
{
'
console
'
:
{
'
level
'
:
'
DEBUG
'
if
DEBUG
else
'
INFO
'
,
'
class
'
:
'
logging.StreamHandler
'
,
'
formatter
'
:
'
standard
'
,
'
stream
'
:
sys
.
stdout
,
},
'
console_err
'
:
{
'
level
'
:
'
ERROR
'
,
'
class
'
:
'
logging.StreamHandler
'
,
'
formatter
'
:
'
standard
'
,
'
stream
'
:
sys
.
stderr
,
},
# 'app' : {
# 'level' : 'INFO',
# 'class' : 'logging.handlers.TimedRotatingFileHandler',
# 'formatter' : 'standard',
# 'filename' : '/tmp/mitx.log', # temporary location for proof of concept
# 'when' : 'midnight',
# 'utc' : True,
# 'encoding' : 'utf-8',
# },
# We should actually use this for tracking:
# http://pypi.python.org/pypi/ConcurrentLogHandler/0.8.2
'
tracking
'
:
{
'
level
'
:
'
INFO
'
,
'
class
'
:
'
logging.handlers.TimedRotatingFileHandler
'
,
'
formatter
'
:
'
raw
'
,
'
filename
'
:
BASE_DIR
+
'
/track_dir/tracking.log
'
,
'
when
'
:
'
midnight
'
,
'
utc
'
:
True
,
'
encoding
'
:
'
utf-8
'
,
},
'
mail_admins
'
:
{
'
level
'
:
'
ERROR
'
,
'
class
'
:
'
django.utils.log.AdminEmailHandler
'
,
},
},
'
loggers
'
:
{
'
django.request
'
:
{
'
handlers
'
:
[
'
mail_admins
'
,
'
console
'
,
'
console_err
'
],
'
level
'
:
'
INFO
'
,
'
propagate
'
:
True
,
},
'
tracking
'
:
{
'
handlers
'
:
[
'
tracking
'
],
'
level
'
:
'
DEBUG
'
,
'
propagate
'
:
False
,
},
'
root
'
:
{
'
handlers
'
:
[
'
console
'
,
'
console_err
'
],
'
level
'
:
'
DEBUG
'
,
'
propagate
'
:
False
},
'
mitx
'
:
{
'
handlers
'
:
[
'
console
'
,
'
console_err
'
],
'
level
'
:
'
DEBUG
'
,
'
propagate
'
:
False
},
}
}
STATIC_URL
=
'
/static/
'
# URL prefix for admin static files -- CSS, JavaScript and images.
...
...
@@ -201,9 +120,100 @@ TRACK_MAX_EVENT = 1000
# Maximum length of log file before starting a new one.
MAXLOG
=
500
LOG_DIR
=
"
/tmp/
"
# Make sure we execute correctly regardless of where we're called from
execfile
(
os
.
path
.
join
(
BASE_DIR
,
"
settings.py
"
))
# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error.
# See http://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging configuration.
LOGGING
=
{
'
version
'
:
1
,
'
disable_existing_loggers
'
:
True
,
'
formatters
'
:
{
'
standard
'
:
{
'
format
'
:
'
%(asctime)s %(levelname)s %(process)d [%(name)s] %(filename)s:%(lineno)d - %(message)s
'
,
},
'
raw
'
:
{
'
format
'
:
'
%(message)s
'
,
}
},
'
handlers
'
:
{
'
console
'
:
{
'
level
'
:
'
DEBUG
'
if
DEBUG
else
'
INFO
'
,
'
class
'
:
'
logging.StreamHandler
'
,
'
formatter
'
:
'
standard
'
,
'
stream
'
:
sys
.
stdout
,
},
'
console_err
'
:
{
'
level
'
:
'
ERROR
'
,
'
class
'
:
'
logging.StreamHandler
'
,
'
formatter
'
:
'
standard
'
,
'
stream
'
:
sys
.
stderr
,
},
'
app
'
:
{
'
level
'
:
'
INFO
'
,
'
class
'
:
'
logging.handlers.TimedRotatingFileHandler
'
,
'
formatter
'
:
'
standard
'
,
'
filename
'
:
LOG_DIR
+
'
/mitx.log
'
,
# temporary location for proof of concept
'
when
'
:
'
midnight
'
,
'
utc
'
:
True
,
'
encoding
'
:
'
utf-8
'
,
},
'
app_err
'
:
{
'
level
'
:
'
ERROR
'
,
'
class
'
:
'
logging.handlers.TimedRotatingFileHandler
'
,
'
formatter
'
:
'
standard
'
,
'
filename
'
:
LOG_DIR
+
'
/mitx.err.log
'
,
# temporary location for proof of concept
'
when
'
:
'
midnight
'
,
'
utc
'
:
True
,
'
encoding
'
:
'
utf-8
'
,
},
# We should actually use this for tracking:
# http://pypi.python.org/pypi/ConcurrentLogHandler/0.8.2
'
tracking
'
:
{
'
level
'
:
'
INFO
'
,
'
class
'
:
'
logging.handlers.TimedRotatingFileHandler
'
,
'
formatter
'
:
'
raw
'
,
'
filename
'
:
LOG_DIR
+
'
/tracking.log
'
,
'
when
'
:
'
midnight
'
,
'
utc
'
:
True
,
'
encoding
'
:
'
utf-8
'
,
},
'
mail_admins
'
:
{
'
level
'
:
'
ERROR
'
,
'
class
'
:
'
django.utils.log.AdminEmailHandler
'
,
},
},
'
loggers
'
:
{
'
django
'
:
{
'
handlers
'
:
[
'
console
'
,
'
mail_admins
'
],
'
propagate
'
:
True
,
'
level
'
:
'
INFO
'
},
'
tracking
'
:
{
'
handlers
'
:
[
'
console
'
,
'
tracking
'
],
'
level
'
:
'
DEBUG
'
,
'
propagate
'
:
False
,
},
'
root
'
:
{
'
handlers
'
:
[
'
console
'
,
'
app
'
,
'
app_err
'
],
'
level
'
:
'
DEBUG
'
,
'
propagate
'
:
False
},
'
mitx
'
:
{
'
handlers
'
:
[
'
console
'
,
'
app
'
,
'
app_err
'
],
'
level
'
:
'
DEBUG
'
,
'
propagate
'
:
False
},
}
}
if
PERFSTATS
:
MIDDLEWARE_CLASSES
=
(
'
perfstats.middleware.ProfileMiddleware
'
,)
+
MIDDLEWARE_CLASSES
...
...
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