mirror of
https://github.com/apache/maven-mvnd.git
synced 2026-01-13 07:04:14 +08:00
Display the daemon id and shorten it a bit, fixes #314
This commit is contained in:
committed by
Peter Palaga
parent
3eb9d8d41b
commit
143f4f13ab
@@ -24,6 +24,8 @@ import org.mvndaemon.mvnd.common.Message;
|
||||
*/
|
||||
public interface ClientOutput extends AutoCloseable {
|
||||
|
||||
void setDaemonId(String uid);
|
||||
|
||||
void setDaemonDispatch(Consumer<Message> sink);
|
||||
|
||||
void setDaemonReceive(Consumer<Message> sink);
|
||||
|
||||
@@ -89,6 +89,7 @@ public class TerminalOutput implements ClientOutput {
|
||||
* Therefore, these fields do not need to be volatile
|
||||
*/
|
||||
private String name;
|
||||
private String daemonId;
|
||||
private int totalProjects;
|
||||
/** String format for formatting the number of projects done with padding based on {@link #totalProjects} */
|
||||
private String projectsDoneFomat;
|
||||
@@ -142,6 +143,11 @@ public class TerminalOutput implements ClientOutput {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDaemonId(String daemonId) {
|
||||
this.daemonId = daemonId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDaemonDispatch(Consumer<Message> daemonDispatch) {
|
||||
this.daemonDispatch = daemonDispatch;
|
||||
@@ -630,6 +636,13 @@ public class TerminalOutput implements ClientOutput {
|
||||
.append('%')
|
||||
.style(AttributedStyle.DEFAULT);
|
||||
|
||||
/* DaemonId */
|
||||
asb
|
||||
.append(" daemon: ")
|
||||
.style(AttributedStyle.BOLD)
|
||||
.append(daemonId)
|
||||
.style(AttributedStyle.DEFAULT);
|
||||
|
||||
} else if (buildStatus != null) {
|
||||
asb
|
||||
.style(AttributedStyle.BOLD)
|
||||
|
||||
Reference in New Issue
Block a user