Console: Fix log file size config bug on /configlogging bug (ticket #1996)

This commit is contained in:
str4d
2017-07-07 17:25:25 +00:00
parent 87d6c302e6
commit d8831151fe
3 changed files with 29 additions and 17 deletions

View File

@ -23,10 +23,7 @@ public class ConfigLoggingHelper extends HelperBase {
public String getMaxFileSize() {
int bytes = _context.logManager().getFileSize();
if (bytes <= 0) return "1.00 MB";
// "&nbsp;" comes back in the POST as 0xc2 0xa0
// non-breaking space is U+00A0 which is 0xc2 0xa0 in UTF-8.
// we could figure out where the UTF-8 problem is but why bother.
return DataHelper.formatSize2(bytes).replace("&nbsp;", " ") + 'B';
return DataHelper.formatSize2(bytes, false) + 'B';
}
public String getLogLevelTable() {
StringBuilder buf = new StringBuilder(32*1024);