web: add a better log method
Add a new method, deluge.log which outputs to the javascript console, including a date and time which will help when debugging speed issues
This commit is contained in:
parent
ab665384d4
commit
d10752fc1a
|
@ -153,6 +153,13 @@ Ext.apply(Deluge, {
|
||||||
// Setup a space for plugins to insert themselves
|
// Setup a space for plugins to insert themselves
|
||||||
deluge.plugins = {};
|
deluge.plugins = {};
|
||||||
|
|
||||||
|
deluge.logDateFormat = 'd/m/Y H:i:s,u';
|
||||||
|
|
||||||
|
deluge.log = function(msg) {
|
||||||
|
var date = new Date()
|
||||||
|
console.log(Ext.Date.format(date, deluge.logDateFormat) + ' - ' + msg);
|
||||||
|
}
|
||||||
|
|
||||||
// Hinting for gettext_gen.py
|
// Hinting for gettext_gen.py
|
||||||
// _('Do Not Download')
|
// _('Do Not Download')
|
||||||
// _('Normal Priority')
|
// _('Normal Priority')
|
||||||
|
|
Loading…
Reference in New Issue