Examples of ErrorStatus


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

      setContextForConverters(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

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

      writerWrite(this.layout.doLayout(event), this.immediateFlush);
    } 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

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

   * 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

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

        // 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
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.