How to print to the same line from multi-threaded application
<p>I was using this code to notify the user of when REST interfaces had become available:</p>

<pre><code>Console.printTermNoBreak("Waiting for interface on host [" + localTarget.getHostName() + "]");
</code></pre>

<p>When the interface came up then it would print 'OK' with a time stamp of how long it took to come up:</p>

<pre><code>Console.SYS_LOGGER.info("[OK]" + " (" + (endTime - startTime + "ms") + ")");
</code></pre>

<p>On the console that would look as follows:</p>

<pre><code>Waiting for interface on host [dubengvm272]         [OK] (413ms)
</code></pre>

<p>So both appenders write to the same line. I have refactored the code so that multiple threads bring up different interfaces on different machines.</p>

<p>Now because all the threads finish at different times the console is all garbled. Just wondering if I can print out in the same way as before, even if it doesn't reflect exactly what is happening in the background.</p>