title: How can I log to a specific file in linux using logger command?
body: <p>I will run the following script:</p>
  
  <pre><code>#!/bin/bash
  ./myprogram
  
  #get exit code
  exitvalue=$?
  
  #log exit code value to /var/log/messages
  logger -s "exit code of my program is " $exitvalue
  </code></pre>
  
  <p>But I don't want log message to be written in <code>/var/log/messages</code> because I don't have root privileges. Instead I want it to be written to a file in my home directory: <code>/home/myuser/mylog</code></p>
  
  <p>How should I modify <code>logger</code> command above?</p>