Class MemoLogger


  • public class MemoLogger
    extends Logger
    Logger that writes all records into a list of strings and can delegate to the another logger. Just for tests.
    Since:
    7.1
    Author:
    Leonid Bushuev from JetBrains
    • Constructor Detail

      • MemoLogger

        public MemoLogger()
    • Method Detail

      • copyingToConsoleLogger

        public static MemoLogger copyingToConsoleLogger​(String consolePrefix,
                                                        org.apache.log4j.Level level)
      • copyingToConsoleLogger

        public static MemoLogger copyingToConsoleLogger​(org.apache.log4j.Level level)
      • clear

        public void clear()
      • asString

        @NotNull
        public String asString()
      • remember

        protected void remember​(@NotNull
                                String prefix,
                                @Nullable
                                String message,
                                @Nullable
                                Throwable exception)
      • hasErrors

        public boolean hasErrors()
      • hasErrorsOrWarnings

        public boolean hasErrorsOrWarnings()
      • getErrors

        public String getErrors()
      • getErrorsList

        public List<String> getErrorsList()
      • getErrorsOrWarnings

        public String getErrorsOrWarnings()
      • hasLinesContains

        public boolean hasLinesContains​(@NotNull
                                        String substr)
      • hasLinesMatches

        public boolean hasLinesMatches​(@NotNull
                                       String pattern)
      • debug

        public void debug​(@NonNls
                          String message)
        Specified by:
        debug in class Logger
      • info

        public void info​(@NonNls
                         String message)
        Specified by:
        info in class Logger
      • setLevel

        public void setLevel​(org.apache.log4j.Level level)
        Specified by:
        setLevel in class Logger