10 Replies Latest reply on May 31, 2011 4:51 PM by 796440

    Suggestions regarding echoing logs to consol instantly.


      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?