title: Syslog-ng fails to read and write locally
body: <p>This is my first question on StackOverflow so forgive me if I accidentally break some rules. </p>
  
  <p>What I am trying to do is have a program write a simple log and have syslog-ng read that log and then write to another file. </p>
  
  <p>This input log file is a file containing random numbers. </p>
  
  <p>Here is the content of my syslog-ng.conf file. </p>
  
  <pre><code>source s_file
  {
          file("/home/vagrant/test1.log" follow-freq(1) flags(no_parse));
  };
  
  destination d_file
  {
          file("/home/vagrant/poc.db");
  };
  
  log
  {
          source(s_file);
          destination(d_file);
  }
  </code></pre>
  
  <p>Here is the source of the program generating the random number. </p>
  
  <pre><code>import java.util.*;
  import java.io.*;
  
  public class loggerSpam{
  
      PrintWriter out;
  
      public loggerSpam() {
              try {
                      out = new PrintWriter(new FileWriter("test1.log"));
              } catch (Exception e) {
                      System.out.println("Caught");
              }finally {
                      System.out.println("Constructor");
              }
       }
  
       public void spam() {
              Random rand = new Random();
  
              try {
                      for (int i = 0; i &lt; 10; i++) {
                              int num = rand.nextInt(10);
                              String msg = Integer.toString(num) + "\n";
                              System.out.print(msg);
                              out.write(msg);
                      }
                      out.close();
  
              } catch (Exception e) {
                      System.out.println(e.toString());
              }
                      }
  
      public static void main(String args[]){
  
              //Create spammer object
              loggerSpam testObj = new loggerSpam();
              //spam test.log
              testObj.spam();
  
      }
  }
  </code></pre>
  
  <p>My understanding is that if I place my config file in /etc/syslog-ng/ then restart syslog-ng service, all I need to do is run my program and syslog-ng should be able to detect that there was a log file generated. Once the log file is generated syslog will read the log and write to my destination file poc.db. </p>
  
  <p>However, my issue is that syslog-ng is not reading test1.log nor is it generating poc.db. Can someone explain why this is? What can I change? From the guides on syslog-ng's website, I need to be able to write files locally so I can debug other issues. </p>
  
  <p>Thank you for any help!</p>