/** * @deprecated Please use * {@link SystemErrRule#enableLog() new SystemErrRule().enableLog()} * instead of * {@code new StandardErrorStreamLog(LogMode.LOG_AND_WRITE_TO_STREAM)} or * {@link SystemErrRule#enableLog() new SystemErrRule().enableLog()}.{@link SystemErrRule#mute() mute()} * instead of {@code new StandardErrorStreamLog(LogMode.LOG_ONLY)}. * * <p>Creates a rule that records writes to the standard error stream * according to the specified {@code LogMode}. * * @param mode how the rule handles writes to the standard error stream. * @throws java.lang.NullPointerException if {@code mode} is null. */ public StandardErrorStreamLog(LogMode mode) { if (mode == null) throw new NullPointerException("The LogMode is missing."); systemErrRule.enableLog(); if (mode == LOG_ONLY) systemErrRule.mute(); }
/** * @deprecated Please use * {@link SystemErrRule#enableLog() new SystemErrRule().enableLog()} * instead of * {@code new StandardErrorStreamLog(LogMode.LOG_AND_WRITE_TO_STREAM)} or * {@link SystemErrRule#enableLog() new SystemErrRule().enableLog()}.{@link SystemErrRule#mute() mute()} * instead of {@code new StandardErrorStreamLog(LogMode.LOG_ONLY)}. * * <p>Creates a rule that records writes to the standard error stream * according to the specified {@code LogMode}. * * @param mode how the rule handles writes to the standard error stream. * @throws java.lang.NullPointerException if {@code mode} is null. */ public StandardErrorStreamLog(LogMode mode) { if (mode == null) throw new NullPointerException("The LogMode is missing."); systemErrRule.enableLog(); if (mode == LOG_ONLY) systemErrRule.mute(); }
/** * @deprecated Please use * {@link SystemErrRule#enableLog() new SystemErrRule().enableLog()} * instead of * {@code new StandardErrorStreamLog(LogMode.LOG_AND_WRITE_TO_STREAM)} or * {@link SystemErrRule#enableLog() new SystemErrRule().enableLog()}.{@link SystemErrRule#mute() mute()} * instead of {@code new StandardErrorStreamLog(LogMode.LOG_ONLY)}. * * <p>Creates a rule that records writes to the standard error stream * according to the specified {@code LogMode}. * * @param mode how the rule handles writes to the standard error stream. * @throws java.lang.NullPointerException if {@code mode} is null. */ public StandardErrorStreamLog(LogMode mode) { if (mode == null) throw new NullPointerException("The LogMode is missing."); systemErrRule.enableLog(); if (mode == LOG_ONLY) systemErrRule.mute(); }