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
08ce3944
Commit
08ce3944
authored
Jul 26, 2012
by
Victor Shnayder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make logging work for xmodule and company.
* We do not want to disable existing loggers when setting up our own
parent
1d554c76
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
lms/envs/logsettings.py
+6
-6
No files found.
lms/envs/logsettings.py
View file @
08ce3944
...
...
@@ -3,19 +3,19 @@ import os.path
import
platform
import
sys
def
get_logger_config
(
log_dir
,
logging_env
=
"no_env"
,
def
get_logger_config
(
log_dir
,
logging_env
=
"no_env"
,
tracking_filename
=
None
,
syslog_addr
=
None
,
debug
=
False
):
"""Return the appropriate logging config dictionary. You should assign the
result of this to the LOGGING var in your settings. The reason it's done
result of this to the LOGGING var in your settings. The reason it's done
this way instead of registering directly is because I didn't want to worry
about resetting the logging state if this is called multiple times when
about resetting the logging state if this is called multiple times when
settings are extended."""
# If we're given an explicit place to put tracking logs, we do that (say for
# debugging). However, logging is not safe for multiple processes hitting
# debugging). However, logging is not safe for multiple processes hitting
# the same file. So if it's left blank, we dynamically create the filename
# based on the PID of this worker process.
if
tracking_filename
:
...
...
@@ -33,7 +33,7 @@ def get_logger_config(log_dir,
return
{
'version'
:
1
,
'disable_existing_loggers'
:
Tru
e
,
'disable_existing_loggers'
:
Fals
e
,
'formatters'
:
{
'standard'
:
{
'format'
:
'
%(asctime)
s
%(levelname)
s
%(process)
d [
%(name)
s]
%(filename)
s:
%(lineno)
d -
%(message)
s'
,
...
...
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