@NonNull public static synchronized ArrayList<String> getAllLogLinesList() {
    ArrayList<String> lines = new ArrayList<>(msLogs.length);
    if (msLogs.length > 0) {
      int index = msLogIndex;
      do {
        index--;
        if (index == -1) index = msLogs.length - 1;
        String logLine = msLogs[index];
        if (logLine == null) break;
        lines.add(msLogs[index]);
      } while (index != msLogIndex);
    }
    return lines;
  }
@Test
  public void testGetAllLogLinesList() throws Exception {
    // filling up the log buffer
    for (int i = 0; i < 1024; i++) Logger.d("t", "t");

    final int initialListSize = Logger.getAllLogLinesList().size();

    // 225 is the max lines count
    Assert.assertEquals(255, initialListSize);

    Logger.d("mTag", "Text1");
    Assert.assertEquals(initialListSize, Logger.getAllLogLinesList().size());

    Logger.i("TAG2", "Text2");
    Assert.assertEquals(initialListSize, Logger.getAllLogLinesList().size());

    final String expectedFirstLine = "-D-[mTag] Text1";
    final String expectedSecondLine = "-I-[TAG2] Text2";

    Assert.assertTrue(Logger.getAllLogLinesList().get(1).endsWith(expectedFirstLine));
    Assert.assertTrue(Logger.getAllLogLinesList().get(0).endsWith(expectedSecondLine));
  }