<div dir="ltr">M.Still recommended logger.  +1<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 12, 2013 at 3:10 PM, Michael Still <span dir="ltr">&lt;<a href="mailto:stillwaxin@gmail.com" target="_blank">stillwaxin@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What about &#39;man logger&#39; ?<br>
<br>
Would think you could use that.  If needed setup a custom log file<br>
based on facility.<br>
<div><div class="h5"><br>
<br>
On Tue, Nov 12, 2013 at 3:02 PM, Scott Plante &lt;<a href="mailto:splante@insightsys.com">splante@insightsys.com</a>&gt; wrote:<br>
&gt; I can&#39;t modify the process itself, or I&#39;d just add the timestamp inside it.<br>
&gt; I can modify the script that calls the process, so if there&#39;s a way of<br>
&gt; routing it&#39;s output to the Linux logging that might be an option. I don&#39;t<br>
&gt; want these messages mixed in with /var/log/messages though. Can you point me<br>
&gt; towards something? Or just a command name or something to make the googling<br>
&gt; easier?<br>
&gt;<br>
&gt; Scott<br>
&gt;<br>
&gt; ________________________________<br>
&gt; From: &quot;Jim Kinney&quot; &lt;<a href="mailto:jim.kinney@gmail.com">jim.kinney@gmail.com</a>&gt;<br>
&gt; To: &quot;Atlanta Linux Enthusiasts&quot; &lt;<a href="mailto:ale@ale.org">ale@ale.org</a>&gt;<br>
&gt; Sent: Tuesday, November 12, 2013 1:39:42 PM<br>
&gt; Subject: Re: [ale] line timestamp command<br>
&gt;<br>
&gt;<br>
&gt; Can you modify the process to just write to standard logging?<br>
&gt;<br>
&gt;<br>
&gt; On Tue, Nov 12, 2013 at 1:34 PM, Scott Plante &lt;<a href="mailto:splante@insightsys.com">splante@insightsys.com</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Does anyone happen to know of a command line tool that will read lines<br>
&gt;&gt; from standard input and write them to std out, pre-pending a timestamp? I<br>
&gt;&gt; have a process that emits messages to std out periodically as it processes<br>
&gt;&gt; and I&#39;d like to write that to a log file, but with a time at the start of<br>
&gt;&gt; the line. I could do it with a script but a nice little command would be<br>
&gt;&gt; better, if it exists.<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m looking for something that would perform the function of this script,<br>
&gt;&gt; maybe with an option for format:<br>
&gt;&gt;<br>
&gt;&gt; while read line;<br>
&gt;&gt; do<br>
&gt;&gt;   echo $(date +&quot;%D %T&quot;) &quot;$line&quot;;<br>
&gt;&gt; done<br>
&gt;&gt;<br>
&gt;&gt; Scott<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Ale mailing list<br>
&gt;&gt; <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
&gt;&gt; <a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
&gt;&gt; See JOBS, ANNOUNCE and SCHOOLS lists at<br>
&gt;&gt; <a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; --<br>
&gt; James P. Kinney III<br>
&gt;<br>
&gt; Every time you stop a school, you will have to build a jail. What you gain<br>
&gt; at one end you lose at the other. It&#39;s like feeding a dog on his own tail.<br>
&gt; It won&#39;t fatten the dog.<br>
&gt; - Speech 11/23/1900 Mark Twain<br>
&gt;<br>
&gt; <a href="http://heretothereideas.blogspot.com/" target="_blank">http://heretothereideas.blogspot.com/</a><br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Ale mailing list<br>
&gt; <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
&gt; <a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
&gt; See JOBS, ANNOUNCE and SCHOOLS lists at<br>
&gt; <a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Ale mailing list<br>
&gt; <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
&gt; <a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
&gt; See JOBS, ANNOUNCE and SCHOOLS lists at<br>
&gt; <a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
&gt;<br>
<br>
<br>
<br>
--<br>
</div></div>[<a href="mailto:stillwaxin@gmail.com">stillwaxin@gmail.com</a> ~]$ cat .signature<br>
cat: .signature: No such file or directory<br>
[<a href="mailto:stillwaxin@gmail.com">stillwaxin@gmail.com</a> ~]$<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">-- <br>James P. Kinney III<br><i><i><i><i><br></i></i></i></i>Every time you stop a school, you will have to build a jail. What you 
        gain at one end you lose at the other. It&#39;s like feeding a dog on his 
        own tail. It won&#39;t fatten the dog.<br>

        - Speech 11/23/1900 Mark Twain<br><i><i><i><i><br><a href="http://heretothereideas.blogspot.com/" target="_blank">http://heretothereideas.blogspot.com/</a><br></i></i></i></i></div>
</div>