Merge branch 'FMLLogFormatter' of https://github.com/donington/FML into gh-updates
This commit is contained in:
commit
b52c44e42b
|
@ -22,33 +22,19 @@ final class FMLLogFormatter extends Formatter
|
||||||
msg.append(this.dateFormat.format(Long.valueOf(record.getMillis())));
|
msg.append(this.dateFormat.format(Long.valueOf(record.getMillis())));
|
||||||
Level lvl = record.getLevel();
|
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] ");
|
msg.append(" ");
|
||||||
}
|
|
||||||
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() + "] ");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (record.getLoggerName() != null)
|
if (record.getLoggerName() != null)
|
||||||
|
|
Loading…
Reference in New Issue