Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.9
    • Fix Version/s: 1.2.10
    • Component/s: Core
    • Labels:
      None
    • Environment:
      From sourceforege - 764025 - Kevin Conroy - kmconroy

      Description

      While using Buffering is a wonderful way to help improve
      performance, I would like the ability to programatically
      tell the current ILog object to flush any buffers that
      exist on the appenders that I've been logging to so that
      I can get any messages that I've sent rather than
      waiting for the buffer to fill up.

      Thus, one might be able to do the following:

      "log.Flush();"

      and then any messages sent to that ILog object would
      be processed.

      Kevin Conroy - kmconroy


      I vote for this one too!

      dcazzulino

        Issue Links

          Activity

          Hide
          nicko Nicko Cadell added a comment -

          This change would potentially require us to break a number of interfaces

          Show
          nicko Nicko Cadell added a comment - This change would potentially require us to break a number of interfaces
          Hide
          roseen Göran Roseen added a comment -

          A workaround - call it ugly or not - would be to log a special message when you want to flush, and then have a trigger on the buffering appender(s)that looks for something specicial in that message.

          Show
          roseen Göran Roseen added a comment - A workaround - call it ugly or not - would be to log a special message when you want to flush, and then have a trigger on the buffering appender(s)that looks for something specicial in that message.
          Hide
          nicko Nicko Cadell added a comment -

          This issue may be alleviated by the addition of a programmatic API for flushing the buffer held by the BufferingAppenderSkeleton. While this is not a general solution for all appenders and all types of output buffering I am going to leave this issue open.

          Show
          nicko Nicko Cadell added a comment - This issue may be alleviated by the addition of a programmatic API for flushing the buffer held by the BufferingAppenderSkeleton. While this is not a general solution for all appenders and all types of output buffering I am going to leave this issue open.
          Hide
          nicko Nicko Cadell added a comment -

          Added Flush(true) method to BufferingAppenderSkeleton. This method forces the current buffer to be flushed to the output even if the appender is in lossy mode.

          To find the appender use the LogManager.GetRepository().GetAppenders() method, then for each BufferingAppenderSkeleton call Flush(true).

          Show
          nicko Nicko Cadell added a comment - Added Flush(true) method to BufferingAppenderSkeleton. This method forces the current buffer to be flushed to the output even if the appender is in lossy mode. To find the appender use the LogManager.GetRepository().GetAppenders() method, then for each BufferingAppenderSkeleton call Flush(true).

            People

            • Assignee:
              nicko Nicko Cadell
              Reporter:
              nicko Nicko Cadell
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development