// Path: logger-core/src/main/java/net/openhft/chronicle/logger/ChronicleLogLevel.java
// public enum ChronicleLogLevel {
//     ERROR(50, "ERROR"),
//     WARN(40, "WARN"),
//     INFO(30, "INFO"),
//     DEBUG(20, "DEBUG"),
//     TRACE(10, "TRACE");
// 
//     /**
//      * Array is not cached in Java enum internals, make the single copy to prevent garbage creation
//      */
//     private static final ChronicleLogLevel[] VALUES = values();
// 
//     private static final int CASE_DIFF = 'A' - 'a';
// 
//     private final int levelInt;
//     private final String levelStr;
// 
//     ChronicleLogLevel(int levelInt, String levelStr) {
//         this.levelInt = levelInt;
//         this.levelStr = levelStr;
//     }
// 
//     public static ChronicleLogLevel fromStringLevel(final CharSequence levelStr) {
//         if (levelStr != null) {
//             for (ChronicleLogLevel cll : VALUES) {
//                 if (fastEqualsIgnoreCase(cll.levelStr, levelStr)) {
//                     return cll;
//                 }
//             }
//         }
// 
//         throw new IllegalArgumentException(levelStr + " not a valid level value");
//     }
// 
//     /**
//      * Package-private for testing.
//      *
//      * @param upperCase string of A-Z characters
//      * @param other     a {@code CharSequence} to compare
//      * @return {@code true} if {@code upperCase} and {@code other} equals ignore case
//      */
//     private static boolean fastEqualsIgnoreCase(@NotNull String upperCase, @NotNull CharSequence other) {
//         int l;
//         if ((l = upperCase.length()) != other.length()) {
//             return false;
//         }
// 
//         for (int i = 0; i < l; i++) {
//             int uC, oC;
//             if ((uC = upperCase.charAt(i)) != (oC = other.charAt(i)) && (uC != oC + CASE_DIFF)) {
//                 return false;
//             }
//         }
// 
//         return true;
//     }
// 
//     public boolean isHigherOrEqualTo(final ChronicleLogLevel presumablyLowerLevel) {
//         return levelInt >= presumablyLowerLevel.levelInt;
//     }
// 
//     @Override
//     public String toString() {
//         return levelStr;
//     }
// }


import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import static java.lang.System.currentTimeMillis;
import static org.junit.Assert.*;
import net.openhft.chronicle.core.io.IOTools;
import net.openhft.chronicle.logger.ChronicleLogLevel;
import net.openhft.chronicle.queue.ChronicleQueue;
import net.openhft.chronicle.wire.DocumentContext;
import net.openhft.chronicle.wire.Wire;
import org.jetbrains.annotations.NotNull;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
                    assertNotNull("log not found for " + level, wire);
                    assertTrue(wire.read("ts").int64() <= currentTimeMillis());
                    assertEquals(level, wire.read("level").asEnum(ChronicleLogLevel.class));
                    assertEquals(threadId, wire.read("threadName").text());
                    assertEquals(testId, wire.read("loggerName").text());
                    assertEquals("level is {}", wire.read("message").text());
                    assertTrue(wire.hasMore());
                    List<Object> args = new ArrayList<>();
                    assertTrue(wire.hasMore());
                    wire.read("args").sequence(args, (l, vi) -> {
                        while (vi.hasNextSequenceItem()) {
                            l.add(vi.object(Object.class));
                        }
                    });
                    assertEquals(level, args.iterator().next());
                    assertFalse(wire.hasMore());
                }
            }
            try (DocumentContext dc = tailer.readingDocument()) {
                Wire wire = dc.wire();
                assertNull(wire);
            }

            logger.debug("Throwable test 1", new UnsupportedOperationException());
            logger.debug("Throwable test 2", new UnsupportedOperationException("Exception message"));

            try (DocumentContext dc = tailer.readingDocument()) {
                Wire wire = dc.wire();
                assertNotNull(wire);
                assertTrue(wire.read("ts").int64() <= currentTimeMillis());
// Path: logger-core/src/main/java/net/openhft/chronicle/logger/ChronicleLogLevel.java
// public enum ChronicleLogLevel {
//     ERROR(50, "ERROR"),
//     WARN(40, "WARN"),
//     INFO(30, "INFO"),
//     DEBUG(20, "DEBUG"),
//     TRACE(10, "TRACE");
// 
//     /**
//      * Array is not cached in Java enum internals, make the single copy to prevent garbage creation
//      */
//     private static final ChronicleLogLevel[] VALUES = values();
// 
//     private static final int CASE_DIFF = 'A' - 'a';
// 
//     private final int levelInt;
//     private final String levelStr;
// 
//     ChronicleLogLevel(int levelInt, String levelStr) {
//         this.levelInt = levelInt;
//         this.levelStr = levelStr;
//     }
// 
//     public static ChronicleLogLevel fromStringLevel(final CharSequence levelStr) {
//         if (levelStr != null) {
//             for (ChronicleLogLevel cll : VALUES) {
//                 if (fastEqualsIgnoreCase(cll.levelStr, levelStr)) {
//                     return cll;
//                 }
//             }
//         }
// 
//         throw new IllegalArgumentException(levelStr + " not a valid level value");
//     }
// 
//     /**
//      * Package-private for testing.
//      *
//      * @param upperCase string of A-Z characters
//      * @param other     a {@code CharSequence} to compare
//      * @return {@code true} if {@code upperCase} and {@code other} equals ignore case
//      */
//     private static boolean fastEqualsIgnoreCase(@NotNull String upperCase, @NotNull CharSequence other) {
//         int l;
//         if ((l = upperCase.length()) != other.length()) {
//             return false;
//         }
// 
//         for (int i = 0; i < l; i++) {
//             int uC, oC;
//             if ((uC = upperCase.charAt(i)) != (oC = other.charAt(i)) && (uC != oC + CASE_DIFF)) {
//                 return false;
//             }
//         }
// 
//         return true;
//     }
// 
//     public boolean isHigherOrEqualTo(final ChronicleLogLevel presumablyLowerLevel) {
//         return levelInt >= presumablyLowerLevel.levelInt;
//     }
// 
//     @Override
//     public String toString() {
//         return levelStr;
//     }
// }


// Path: logger-logback/src/test/java/net/openhft/chronicle/logger/logback/LogbackChronicleBinaryAppenderTest.java
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import static java.lang.System.currentTimeMillis;
import static org.junit.Assert.*;
import net.openhft.chronicle.core.io.IOTools;
import net.openhft.chronicle.logger.ChronicleLogLevel;
import net.openhft.chronicle.queue.ChronicleQueue;
import net.openhft.chronicle.wire.DocumentContext;
import net.openhft.chronicle.wire.Wire;
import org.jetbrains.annotations.NotNull;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;

                    assertNotNull("log not found for " + level, wire);
                    assertTrue(wire.read("ts").int64() <= currentTimeMillis());
                    assertEquals(level, wire.read("level").asEnum(ChronicleLogLevel.class));
                    assertEquals(threadId, wire.read("threadName").text());
                    assertEquals(testId, wire.read("loggerName").text());
                    assertEquals("level is {}", wire.read("message").text());
                    assertTrue(wire.hasMore());
                    List<Object> args = new ArrayList<>();
                    assertTrue(wire.hasMore());
                    wire.read("args").sequence(args, (l, vi) -> {
                        while (vi.hasNextSequenceItem()) {
                            l.add(vi.object(Object.class));
                        }
                    });
                    assertEquals(level, args.iterator().next());
                    assertFalse(wire.hasMore());
                }
            }
            try (DocumentContext dc = tailer.readingDocument()) {
                Wire wire = dc.wire();
                assertNull(wire);
            }

            logger.debug("Throwable test 1", new UnsupportedOperationException());
            logger.debug("Throwable test 2", new UnsupportedOperationException("Exception message"));

            try (DocumentContext dc = tailer.readingDocument()) {
                Wire wire = dc.wire();
                assertNotNull(wire);
                assertTrue(wire.read("ts").int64() <= currentTimeMillis());
                assertEquals(ChronicleLogLevel.DEBUG, wire.read("level").asEnum(ChronicleLogLevel.class));