Thanks for the feedback, folks. I think we'll end up using an explicit 
"log-trim" regex for this. -Ben

On Thursday, March 17, 2022 at 3:03:08 PM UTC+13 Rob 'Commander' Pike wrote:

> I would approach the problem a different way and ask the question, how 
> do I split the string to separate the time? The time parser doesn't 
> have to be the one to do this. For instance, uou could require a 
> marker (if the word INFO or its substitute isn't already one), such as 
> a spaced hyphen: 
>
> 2006-01-02 15:04:05 - INFO this is a log message 
>
> -rob 
>
> On Thu, Mar 17, 2022 at 11:44 AM ben...@gmail.com <ben...@gmail.com> 
> wrote: 
> > 
> > 
> >> How does the user control the format of the timestamp? How do you get 
> the time.Parse layout? 
> > 
> > 
> > The project is a lightweight service manager, so the user "controls" the 
> format of the timestamp based on the service they're running. For example, 
> if they're running nginx, it will output logs (and timestamps) in a certain 
> format, and so on. 
> > 
> > The service manager has configuration per service, and that's where 
> we're going to specify the time.Parse (or perhaps regex) layout. 
> > 
> > -Ben 
> > 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "golang-nuts" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to golang-nuts...@googlegroups.com. 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/17f2caf4-765b-4e14-845d-5b0d8bde064dn%40googlegroups.com.
>  
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/429138a0-cac0-4e96-8248-a1af3c73abf0n%40googlegroups.com.

Reply via email to