[ale] line timestamp command

Jim Kinney jim.kinney at gmail.com
Tue Nov 12 15:18:04 EST 2013


M.Still recommended logger.  +1


On Tue, Nov 12, 2013 at 3:10 PM, Michael Still <stillwaxin at gmail.com> wrote:

> What about 'man logger' ?
>
> Would think you could use that.  If needed setup a custom log file
> based on facility.
>
>
> On Tue, Nov 12, 2013 at 3:02 PM, Scott Plante <splante at insightsys.com>
> wrote:
> > I can't modify the process itself, or I'd just add the timestamp inside
> it.
> > I can modify the script that calls the process, so if there's a way of
> > routing it's output to the Linux logging that might be an option. I don't
> > want these messages mixed in with /var/log/messages though. Can you
> point me
> > towards something? Or just a command name or something to make the
> googling
> > easier?
> >
> > Scott
> >
> > ________________________________
> > From: "Jim Kinney" <jim.kinney at gmail.com>
> > To: "Atlanta Linux Enthusiasts" <ale at ale.org>
> > Sent: Tuesday, November 12, 2013 1:39:42 PM
> > Subject: Re: [ale] line timestamp command
> >
> >
> > Can you modify the process to just write to standard logging?
> >
> >
> > On Tue, Nov 12, 2013 at 1:34 PM, Scott Plante <splante at insightsys.com>
> > wrote:
> >>
> >> Does anyone happen to know of a command line tool that will read lines
> >> from standard input and write them to std out, pre-pending a timestamp?
> I
> >> have a process that emits messages to std out periodically as it
> processes
> >> and I'd like to write that to a log file, but with a time at the start
> of
> >> the line. I could do it with a script but a nice little command would be
> >> better, if it exists.
> >>
> >> I'm looking for something that would perform the function of this
> script,
> >> maybe with an option for format:
> >>
> >> while read line;
> >> do
> >>   echo $(date +"%D %T") "$line";
> >> done
> >>
> >> Scott
> >>
> >>
> >> _______________________________________________
> >> Ale mailing list
> >> Ale at ale.org
> >> http://mail.ale.org/mailman/listinfo/ale
> >> See JOBS, ANNOUNCE and SCHOOLS lists at
> >> http://mail.ale.org/mailman/listinfo
> >>
> >
> >
> >
> > --
> > --
> > James P. Kinney III
> >
> > 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.
> > - Speech 11/23/1900 Mark Twain
> >
> > http://heretothereideas.blogspot.com/
> >
> > _______________________________________________
> > Ale mailing list
> > Ale at ale.org
> > http://mail.ale.org/mailman/listinfo/ale
> > See JOBS, ANNOUNCE and SCHOOLS lists at
> > http://mail.ale.org/mailman/listinfo
> >
> >
> > _______________________________________________
> > Ale mailing list
> > Ale at ale.org
> > http://mail.ale.org/mailman/listinfo/ale
> > See JOBS, ANNOUNCE and SCHOOLS lists at
> > http://mail.ale.org/mailman/listinfo
> >
>
>
>
> --
> [stillwaxin at gmail.com ~]$ cat .signature
> cat: .signature: No such file or directory
> [stillwaxin at gmail.com ~]$
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>



-- 
-- 
James P. Kinney III

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.
- Speech 11/23/1900 Mark Twain


*http://heretothereideas.blogspot.com/
<http://heretothereideas.blogspot.com/>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20131112/7f83201e/attachment.html>


More information about the Ale mailing list