Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Suggestions regarding echoing logs to consol instantly.

864321May 25 2011 — edited May 31 2011
Hi,

I am working on a console application much like a shell. The situation is briefly like this.

1. User is presented a prompt.
2. User types a command on shell.
3. Shell looks up the appropriate command and invokes it.
4. STEP 1.

The individual commands when processing a user request might write info, exceptions etc to logger.
I want these to be echoed on the console BEFORE the prompt is presented to the user again.

However, because of the delayed handling of log printing, the messages are sometimes printed after the prompt is presented. which looks very ugly.

Can this be achieved by some separate custom handler? or I will have to use separate SOUT's for echoing to console and turn off logger from spitting to console?
This post has been answered by jschellSomeoneStoleMyAlias on May 29 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 28 2011
Added on May 25 2011
10 comments
4,422 views