Print full class path for enums (UnitLogger)
This commit is contained in:
parent
c66a780b78
commit
9f646db94a
1 changed files with 8 additions and 1 deletions
|
@ -46,9 +46,16 @@ public class UnitLogger {
|
|||
|
||||
StringBuilder args = new StringBuilder();
|
||||
for (Object arg : additionalStuff) {
|
||||
boolean stringQuotes = arg instanceof String;
|
||||
|
||||
// Print full class path for enums
|
||||
if (arg instanceof Enum<?>) {
|
||||
arg = arg.getClass().getName() + "." + ((Enum<?>) arg).name();
|
||||
}
|
||||
|
||||
if (!args.isEmpty()) args.append(" ");
|
||||
args.append("'");
|
||||
if (arg instanceof String)
|
||||
if (stringQuotes)
|
||||
args.append("\"").append(arg).append("\"");
|
||||
else
|
||||
args.append(arg);
|
||||
|
|
Loading…
Reference in a new issue