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