1   /**
2    * LOGBack: the reliable, fast and flexible logging library for Java.
3    * 
4    * Copyright (C) 1999-2006, QOS.ch
5    * 
6    * This library is free software, you can redistribute it and/or modify it under
7    * the terms of the GNU Lesser General Public License as published by the Free
8    * Software Foundation.
9    */
10  package ch.qos.logback.core.rolling;
11  
12  import java.io.FileInputStream;
13  import java.io.InputStream;
14  
15  
16  /**
17   * Keep the file "output/test.log open for 10 seconds so that we can test
18   * RollingFileAppender's ability to roll file open by another process.
19   * @author Ceki G&uumllcü
20   */
21  public class FileOpener {
22    public static void main(String[] args) throws Exception {
23      InputStream is = new FileInputStream("output/test.log");
24      is.read();
25      Thread.sleep(10000);
26      is.close();
27      System.out.println("Exiting FileOpener");
28    }
29  }