Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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-platform
Commits
63cb53c9
Commit
63cb53c9
authored
Jan 25, 2012
by
David Ormsbee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move logging config, add tracking info to console, remove logging tests.
parent
98efb8c0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
85 deletions
+91
-85
courseware/views.py
+0
-4
settings_new_askbot.py
+91
-81
No files found.
courseware/views.py
View file @
63cb53c9
...
@@ -35,10 +35,6 @@ def profile(request):
...
@@ -35,10 +35,6 @@ def profile(request):
if
not
request
.
user
.
is_authenticated
():
if
not
request
.
user
.
is_authenticated
():
return
redirect
(
'/'
)
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
)
dom
=
content_parser
.
course_file
(
request
.
user
)
hw
=
[]
hw
=
[]
course
=
dom
.
xpath
(
'//course/@name'
)[
0
]
course
=
dom
.
xpath
(
'//course/@name'
)[
0
]
...
...
settings_new_askbot.py
View file @
63cb53c9
...
@@ -56,87 +56,6 @@ USE_I18N = True
...
@@ -56,87 +56,6 @@ USE_I18N = True
# calendars according to the current locale
# calendars according to the current locale
USE_L10N
=
True
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/'
STATIC_URL
=
'/static/'
# URL prefix for admin static files -- CSS, JavaScript and images.
# URL prefix for admin static files -- CSS, JavaScript and images.
...
@@ -201,9 +120,100 @@ TRACK_MAX_EVENT = 1000
...
@@ -201,9 +120,100 @@ TRACK_MAX_EVENT = 1000
# Maximum length of log file before starting a new one.
# Maximum length of log file before starting a new one.
MAXLOG
=
500
MAXLOG
=
500
LOG_DIR
=
"/tmp/"
# Make sure we execute correctly regardless of where we're called from
# Make sure we execute correctly regardless of where we're called from
execfile
(
os
.
path
.
join
(
BASE_DIR
,
"settings.py"
))
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
:
if
PERFSTATS
:
MIDDLEWARE_CLASSES
=
(
'perfstats.middleware.ProfileMiddleware'
,)
+
MIDDLEWARE_CLASSES
MIDDLEWARE_CLASSES
=
(
'perfstats.middleware.ProfileMiddleware'
,)
+
MIDDLEWARE_CLASSES
...
...
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