I do not know off the top of my head and I cannot dig into this ATM but... how about putting the \r in the pattern in your log4j.xml config?
Gary On Fri, Jun 20, 2014 at 9:43 AM, Petar Tahchiev <[email protected]> wrote: > Hi Gary, > > it doesn't, and I'm wondering where's the problem. I have Jansi and it > colors my output just fine, however calling multiple times > > System.out.print("\r [...... ]") > > will result in > > [......... ] > > being displayed on the same line. And calling multiple times > > LOG.info("\r [...... ]") > > will result in a new line every time it is called: > [. ] > [.. ] > [... ] > [.... ] > > Any idea why is that? > > > > > 2014-06-20 15:49 GMT+03:00 Gary Gregory <[email protected]>: > > > Log4j 2 supports JAnsi out of the box which should work for that. For > Log4j > > 1, you'd have to write your own appender on top of JAnsi. > > > > Gary > > > > > > On Fri, Jun 20, 2014 at 8:28 AM, Petar Tahchiev <[email protected]> > > wrote: > > > > > Hi guys, > > > > > > I was wondering if there's a LOG4J console appender out there that > > supports > > > a carriage return \r (to put the cursor back on the same line). > > > > > > Cheers, Petar. > > > > > > -- > > > Regards, Petar! > > > Karlovo, Bulgaria. > > > --- > > > Public PGP Key at: > > > > > > https://keyserver1.pgp.com/vkd/DownloadKey.event?keyid=0x19658550C3110611 > > > Key Fingerprint: A369 A7EE 61BC 93A3 CDFF 55A5 1965 8550 C311 0611 > > > > > > > > > > > -- > > E-Mail: [email protected] | [email protected] > > Java Persistence with Hibernate, Second Edition > > <http://www.manning.com/bauer3/> > > JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> > > Spring Batch in Action <http://www.manning.com/templier/> > > Blog: http://garygregory.wordpress.com > > Home: http://garygregory.com/ > > Tweet! http://twitter.com/GaryGregory > > > > > > -- > Regards, Petar! > Karlovo, Bulgaria. > --- > Public PGP Key at: > https://keyserver1.pgp.com/vkd/DownloadKey.event?keyid=0x19658550C3110611 > Key Fingerprint: A369 A7EE 61BC 93A3 CDFF 55A5 1965 8550 C311 0611 > -- E-Mail: [email protected] | [email protected] Java Persistence with Hibernate, Second Edition <http://www.manning.com/bauer3/> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> Spring Batch in Action <http://www.manning.com/templier/> Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory
