mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-04-13 09:42:01 +00:00
Turning off logging/debug for Production. I need to make a Staging server that is on the Production environment to a T, except Debug is turned on.
This commit is contained in:
parent
311962dad6
commit
dea1a35e93
3 changed files with 19 additions and 14 deletions
|
@ -170,6 +170,9 @@ a img {
|
|||
display: block;
|
||||
padding: 4px 0px;
|
||||
}
|
||||
#story_titles .story.read a.story_title {
|
||||
color: #575757;
|
||||
}
|
||||
|
||||
#story_titles .story .story_title .NB-storytitles-author {
|
||||
padding-left: 12px;
|
||||
|
|
|
@ -42,19 +42,21 @@ NEWSBLUR.AssetModel.Reader.prototype = {
|
|||
success: function(o) {
|
||||
var log_regex = /\s+<div id="django_log"([\s|\S])*$/m;
|
||||
var log_index = o.indexOf('<div id="django_log"');
|
||||
var log = o.substring(log_index);
|
||||
var raw_data = o.substring(0, log_index);
|
||||
var data = eval('(' + raw_data + ')');
|
||||
if(callback && typeof callback == 'function'){
|
||||
callback(data);
|
||||
}
|
||||
if (log) {
|
||||
var log_js_index_begin = log.indexOf('<script type="text/javascript">');
|
||||
var log_js_index_end = log.indexOf('</script>');
|
||||
var log_html = log.substring(0, log_js_index_begin);
|
||||
var log_js = log.substring(log_js_index_begin+31, log_js_index_end);
|
||||
$('#django_log').replaceWith(log_html);
|
||||
var js = eval(log_js);
|
||||
if (log_index) { // Debug is True
|
||||
var log = o.substring(log_index);
|
||||
var raw_data = o.substring(0, log_index);
|
||||
var data = eval('(' + raw_data + ')');
|
||||
if(callback && typeof callback == 'function'){
|
||||
callback(data);
|
||||
}
|
||||
if (log) {
|
||||
var log_js_index_begin = log.indexOf('<script type="text/javascript">');
|
||||
var log_js_index_end = log.indexOf('</script>');
|
||||
var log_html = log.substring(0, log_js_index_begin);
|
||||
var log_js = log.substring(log_js_index_begin+31, log_js_index_end);
|
||||
$('#django_log').replaceWith(log_html);
|
||||
var js = eval(log_js);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -30,7 +30,7 @@ if PRODUCTION:
|
|||
TEMPLATE_DIRS = (
|
||||
'/home/conesus/newsblur/templates'
|
||||
)
|
||||
DEBUG = True
|
||||
DEBUG = False
|
||||
CACHE_BACKEND = 'locmem:///'
|
||||
logging.basicConfig(level=logging.WARN,
|
||||
format='%(asctime)s %(levelname)s %(message)s',
|
||||
|
|
Loading…
Add table
Reference in a new issue