mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-25 00:50:31 +00:00
Small cleanup
This commit is contained in:
parent
07be7eb7d6
commit
9d0da32e4f
2 changed files with 11 additions and 9 deletions
|
@ -1,6 +1,5 @@
|
|||
package io.xpipe.core.store;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
@ -33,7 +32,4 @@ public interface ProcessControl extends AutoCloseable {
|
|||
InputStream getStderr();
|
||||
|
||||
Charset getCharset();
|
||||
|
||||
BufferedReader getStdoutReader();
|
||||
BufferedReader getStderrReader();
|
||||
}
|
||||
|
|
|
@ -18,8 +18,10 @@ public class TrackEvent {
|
|||
private String type;
|
||||
private String message;
|
||||
private String category;
|
||||
|
||||
@Singular
|
||||
private Map<String, Object> tags;
|
||||
|
||||
@Singular
|
||||
private List<String> elements;
|
||||
|
||||
|
@ -97,15 +99,19 @@ public class TrackEvent {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
var s = message;
|
||||
var s = new StringBuilder(message);
|
||||
if (tags.size() > 0) {
|
||||
s += " {\n";
|
||||
s.append(" {\n");
|
||||
for (var e : tags.entrySet()) {
|
||||
s += " " + e.getKey() + "=" + e.getValue() + "\n";
|
||||
s.append(" ")
|
||||
.append(e.getKey())
|
||||
.append("=")
|
||||
.append(e.getValue())
|
||||
.append("\n");
|
||||
}
|
||||
s += "}";
|
||||
s.append("}");
|
||||
}
|
||||
return s;
|
||||
return s.toString();
|
||||
}
|
||||
|
||||
public static class TrackEventBuilder {
|
||||
|
|
Loading…
Reference in a new issue