mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
fix 'clear logs' on windows
This commit is contained in:
parent
012d0d35d3
commit
5ec2b83320
@ -397,6 +397,11 @@ FileAppender.prototype = {
|
||||
} catch(e) {
|
||||
dump("Error writing file:\n" + e);
|
||||
}
|
||||
},
|
||||
|
||||
clear: function FApp_clear() {
|
||||
this.closeStream();
|
||||
this._file.remove(false);
|
||||
}
|
||||
};
|
||||
FileAppender.prototype.__proto__ = new Appender();
|
||||
|
@ -263,12 +263,17 @@ WeaveSvc.prototype = {
|
||||
if (!verbose.exists())
|
||||
verbose.create(verbose.NORMAL_FILE_TYPE, PERMS_FILE);
|
||||
|
||||
let fapp = Log4Moz.Service.newFileAppender("rotating", brief, formatter);
|
||||
fapp.level = Log4Moz.Level[Utils.prefs.getCharPref("log.appender.briefLog")];
|
||||
root.addAppender(fapp);
|
||||
let vapp = Log4Moz.Service.newFileAppender("rotating", verbose, formatter);
|
||||
vapp.level = Log4Moz.Level[Utils.prefs.getCharPref("log.appender.debugLog")];
|
||||
root.addAppender(vapp);
|
||||
this._briefApp = Log4Moz.Service.newFileAppender("rotating", brief, formatter);
|
||||
this._briefApp.level = Log4Moz.Level[Utils.prefs.getCharPref("log.appender.briefLog")];
|
||||
root.addAppender(this._briefApp);
|
||||
this._debugApp = Log4Moz.Service.newFileAppender("rotating", verbose, formatter);
|
||||
this._debugApp.level = Log4Moz.Level[Utils.prefs.getCharPref("log.appender.debugLog")];
|
||||
root.addAppender(this._debugApp);
|
||||
},
|
||||
|
||||
clearLogs: function WeaveSvc_clearLogs() {
|
||||
this._briefApp.clear();
|
||||
this._debugApp.clear();
|
||||
},
|
||||
|
||||
_createUserDir: function WeaveSync__createUserDir(serverURL) {
|
||||
|
Loading…
Reference in New Issue
Block a user