Merge branch 'FMLLogFormatter' of https://github.com/donington/FML into gh-updates

This commit is contained in:
Christian 2013-01-20 11:31:24 -05:00
commit b52c44e42b
1 changed files with 8 additions and 22 deletions

View File

@ -22,33 +22,19 @@ final class FMLLogFormatter extends Formatter
msg.append(this.dateFormat.format(Long.valueOf(record.getMillis())));
Level lvl = record.getLevel();
if (lvl == Level.FINEST)
String name = lvl.getLocalizedName();
if ( name == null )
{
msg.append(" [FINEST] ");
name = lvl.getName();
}
else if (lvl == Level.FINER)
if ( ( name != null ) && ( name.length() > 0 ) )
{
msg.append(" [FINER] ");
msg.append(" [" + name + "] ");
}
else if (lvl == Level.FINE)
else
{
msg.append(" [FINE] ");
}
else if (lvl == Level.INFO)
{
msg.append(" [INFO] ");
}
else if (lvl == Level.WARNING)
{
msg.append(" [WARNING] ");
}
else if (lvl == Level.SEVERE)
{
msg.append(" [SEVERE] ");
}
else if (lvl == Level.SEVERE)
{
msg.append(" [" + lvl.getLocalizedName() + "] ");
msg.append(" ");
}
if (record.getLoggerName() != null)