FMLLogFormatter: dynamic log level name
FMLLogFormatter now uses getLocalizedName or getName for log level name Changes to be committed: modified: common/cpw/mods/fml/relauncher/FMLLogFormatter.java
This commit is contained in:
parent
8edde44161
commit
3e4ed24750
1 changed files with 8 additions and 22 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue