MCPcopy
hub / github.com/arduino/Arduino / format

Method format

app/src/processing/app/helpers/LogFormatter.java:48–77  ·  view source on GitHub ↗
(LogRecord record)

Source from the content-addressed store, hash-verified

46 }
47
48 @Override
49 public String format(LogRecord record) {
50 dat.setTime(record.getMillis());
51 String source;
52 if (record.getSourceClassName() != null) {
53 source = record.getSourceClassName().substring(record.getSourceClassName().lastIndexOf('.') + 1);
54 if (record.getSourceMethodName() != null) {
55 source += "." + record.getSourceMethodName();
56 }
57 } else {
58 source = record.getLoggerName();
59 }
60 String message = formatMessage(record);
61 String throwable = "";
62 if (record.getThrown() != null) {
63 StringWriter sw = new StringWriter();
64 PrintWriter pw = new PrintWriter(sw);
65 pw.println();
66 record.getThrown().printStackTrace(pw);
67 pw.close();
68 throwable = sw.toString();
69 }
70 return String.format(format,
71 dat,
72 source,
73 record.getLoggerName(),
74 record.getLevel(),
75 message,
76 throwable);
77 }
78
79}

Callers 15

setButtonOrLinkMethod · 0.45
setButtonOrLinkMethod · 0.45
updateMethod · 0.45
toStringMethod · 0.45
loadMethod · 0.45
getColorCycleColorMethod · 0.45
setColorCycleColorMethod · 0.45
addTimestampsMethod · 0.45
BaseMethod · 0.45
rebuildImportMenuMethod · 0.45

Calls 3

printStackTraceMethod · 0.80
closeMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected