Package ch.qos.logback.core.status

Examples of ch.qos.logback.core.status.ErrorStatus


          + getDescription(), this));
    }
  }

  void postIOFailure(IOException e) {
    addStatusIfCountNotOverLimit(new ErrorStatus("IO failure while writing to "
        + getDescription(), this, e));
    presumedClean = false;
    if (recoveryCoordinator == null) {
      recoveryCoordinator = new RecoveryCoordinator();
    }
View Full Code Here


    // subsequent writes must always be in append mode
    try {
      os = openNewOutputStream();
      presumedClean = true;
    } catch (IOException e) {
      addStatusIfCountNotOverLimit(new ErrorStatus("Failed to open "
          + getDescription(), this, e));
    }
  }
View Full Code Here

      ConverterUtil.setContextForConverters(getContext(), head);
      ConverterUtil.startConverters(this.head);
      super.start();
    } catch (ScanException sce) {
      StatusManager sm = getContext().getStatusManager();
      sm.add(new ErrorStatus("Failed to parse pattern \"" + getPattern()
          + "\".", this, sce));
    }
  }
View Full Code Here

   * activates this appender.
   */
  public void start() {
    int errors = 0;
    if (this.encoder == null) {
      addStatus(new ErrorStatus("No encoder set for the appender named \""
          + name + "\".", this));
      errors++;
    }

    if (this.outputStream == null) {
      addStatus(new ErrorStatus(
          "No output stream set for the appender named \"" + name + "\".", this));
      errors++;
    }
    // only error free appenders should be activated
    if (errors == 0) {
View Full Code Here

        // before closing we have to output out layout's footer
        encoderClose();
        this.outputStream.close();
        this.outputStream = null;
      } catch (IOException e) {
        addStatus(new ErrorStatus(
            "Could not close output stream for OutputStreamAppender.", this, e));
      }
    }
  }
View Full Code Here

    if (encoder != null && this.outputStream != null) {
      try {
        encoder.init(outputStream);
      } catch (IOException ioe) {
        this.started = false;
        addStatus(new ErrorStatus(
            "Failed to initialize encoder for appender named [" + name + "].",
            this, ioe));
      }
    }
  }
View Full Code Here

    if (encoder != null && this.outputStream != null) {
      try {
        encoder.close();
      } catch (IOException ioe) {
        this.started = false;
        addStatus(new ErrorStatus("Failed to write footer for appender named ["
            + name + "].", this, ioe));
      }
    }
  }
View Full Code Here

      }
    } catch (IOException ioe) {
      // as soon as an exception occurs, move to non-started state
      // and add a single ErrorStatus to the SM.
      this.started = false;
      addStatus(new ErrorStatus("IO failure in appender", this, ioe));
    }
  }
View Full Code Here

        jc.setContext(this);
        jc.doConfigure(filename);

      } else {
        getStatusManager().add(
            new ErrorStatus("[" + filename + "] does not exist", this));
      }

      if (getName() == null) {
        setName("LogbackRequestLog");
      }
View Full Code Here

          errorCount++;
          if (errorCount < MAX_ERROR_COUNT) {
            addError("Exception thrown for evaluator named [" + ee.getName()
                + "]", eex);
          } else if (errorCount == MAX_ERROR_COUNT) {
            ErrorStatus errorStatus = new ErrorStatus(
                "Exception thrown for evaluator named [" + ee.getName() + "].",
                this, eex);
            errorStatus.add(new ErrorStatus(
                "This was the last warning about this evaluator's errors."
                    + "We don't want the StatusManager to get flooded.", this));
            addStatus(errorStatus);
          }
View Full Code Here

TOP

Related Classes of ch.qos.logback.core.status.ErrorStatus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.