Uploaded image for project: 'MINA'
  1. MINA
  2. DIRMINA-1100

printStackTrace in AbstractPollingIoProcessor:1109

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • 2.0.19
    • None
    • Core
    • None

    Description

      I'm using a SMTP server based on mina and i seem to run into this catch block in AbstractPollingIoProcessor:1109

      try {
          localWrittenBytes = write(session, buf, length);
      } catch (IOException ioe) {
          ioe.printStackTrace();
      
          // We have had an issue while trying to send data to the
          // peer : let's close the session.
          buf.free();
          session.closeNow();
          this.removeNow(session);
      
          return 0;
      }
      

      Well on the internet there all kinds of crooked smtp clients around, so i see the exception quite often. What i don't like that is printed on standard error instead of using the embedded logging.

      Is it possible to change the line:

      ioe.printStackTrace();
      

      into

      LOG.error("Issue while trying to send data to the peer. Closing connection.", ioe);
      

       

      That way i can decide if i care about it and maybe silence that one.

       

      Thanks!

      Attachments

        Activity

          People

            johnnyv Jonathan Valliere
            MrSpock Michael Kunze
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: