title: Where does linux store my syslog?
body: <p>I wrote a simple test application to log something in a log file. I am using <b>linux mint</b> and after the application executes I try to view the log using this command: </p>
  
  <pre><code>tail -n 100 /var/log/messages
  </code></pre>
  
  <p>but the file messages does not exist neither tested or something. Below you can find my code. Maybe I am doing something wrong, the file isn't stored there or I need to enable logging in linux mint.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;syslog.h&gt;
  
  void init_log()
  {
      setlogmask(LOG_UPTO(LOG_NOTICE));
      openlog("testd",LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1);
  }
  
  int main(void) {
  
      init_log();
      printf("Session started!");
      syslog(LOG_NOTICE, "Session started!!");
      closelog();
  
      return EXIT_SUCCESS;
  }
  </code></pre>