Examples of ErrorStatus


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

  }

  final void noAppenderDefinedWarning(final Logger logger) {
    if (noAppenderWarning++ == 0) {
      getStatusManager().add(
          new ErrorStatus("No appenders present in context [" + getName()
              + "] for logger [" + logger.getName() + "].", logger));
    }
  }
View Full Code Here

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

      if (!file2zip.delete()) {
        addStatus(new WarnStatus("Could not delete [" + nameOfFile2zip + "].",
                this));
      }
    } catch (Exception e) {
      addStatus(new ErrorStatus("Error occurred while compressing ["
              + nameOfFile2zip + "] into [" + nameOfZippedFile + "].", this, e));
    } finally {
      if (bis != null) {
        try {
          bis.close();
View Full Code Here

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

      if (!file2gz.delete()) {
        addStatus(new WarnStatus("Could not delete [" + nameOfFile2gz + "].",
                this));
      }
    } catch (Exception e) {
      addStatus(new ErrorStatus("Error occurred while compressing ["
              + nameOfFile2gz + "] into [" + nameOfgzedFile + "].", this, e));
    } finally {
      if (bis != null) {
        try {
          bis.close();
View Full Code Here

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

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

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

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

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

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

        retval = new OutputStreamWriter(os, enc);
      } else {
        retval = new OutputStreamWriter(os);
      }
    } catch (IOException e) {
      addStatus(new ErrorStatus("Error initializing output writer.", this, e));
      if (enc != null) {
        addStatus(new ErrorStatus("Unsupported encoding?", this));
      }
    }
    return retval;
  }
View Full Code Here

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

          writerWrite(sb.toString(), true);
        }

      } catch (IOException ioe) {
        this.started = false;
        addStatus(new ErrorStatus("Failed to write header for appender named ["
            + name + "].", this, ioe));
      }
    }
  }
View Full Code Here

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

        if (sb.length() > 0) {
          writerWrite(sb.toString(), true); // force flush
        }
      } catch (IOException ioe) {
        this.started = false;
        addStatus(new ErrorStatus("Failed to write footer for appender named ["
            + name + "].", this, ioe));
      }
    }
  }
View Full Code Here

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

      }
    } 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

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

    return (Logger) loggerCache.get(name);
  }
 
  final void noAppenderDefinedWarning(final Logger logger) {
     if (noAppenderWarning++ == 0) {
          getStatusManager().add(new ErrorStatus(
          "No appenders present in context ["+ getName() +"] for logger [" + logger.getName() + "].", logger));
     }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.