Add COMMON_PRODUCTION_ERROR_LOGGING setting to control the logging of errors in production. Defaults to False. Change the error log file handle class to RotatingFileHandle to avoid an indefinitely growing log file.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -55,6 +55,14 @@ setting_temporary_directory = namespace.add_setting(
|
||||
),
|
||||
is_path=True
|
||||
)
|
||||
setting_production_error_logging = namespace.add_setting(
|
||||
global_name='COMMON_PRODUCTION_ERROR_LOGGING',
|
||||
default=False,
|
||||
help_text=_(
|
||||
'Enable error logging outside of the system error logging '
|
||||
'capabilities.'
|
||||
)
|
||||
)
|
||||
setting_production_error_log_path = namespace.add_setting(
|
||||
global_name='COMMON_PRODUCTION_ERROR_LOG_PATH',
|
||||
default=os.path.join(settings.MEDIA_ROOT, 'error.log'), help_text=_(
|
||||
|
||||
Reference in New Issue
Block a user