Re: [racket-users] Loggers that don't prepend?

2018-11-27 Thread David Storrs
Cool, thanks!

On Mon, Nov 26, 2018 at 11:20 PM Greg Hendershott 
wrote:

> make-log-receiver returns a synchronizable event; you start a thread
> to loop and sync on that. Formatting and disposition is up to you.
>
> 1. Example from XREPL, displaying to stdout with `;` comment chars
> prepended:
>
>
> https://github.com/racket/xrepl/blob/master/xrepl-lib/xrepl/xrepl.rkt#L1286-L1307
>
> 2. Example from racket-mode, writing to a TCP port...
>
>
> https://github.com/greghendershott/racket-mode/blob/b977873e6128f8399432dcd60cc39f6a6f803d9c/racket/logger.rkt
>
> ...for the Emacs front-end to read from, and do things like color-code
> the log levels, then display in a dedicated window:
>
>
> https://github.com/greghendershott/racket-mode/blob/master/racket-logger.el
>
> 3. I have also done a log-receiver that ships log events as JSON to
> AWS CloudWatch Logs, for https://deals.extramaze.com but that code
> isn't open source now.
>
> Log receivers are fun.
>
> Anyway you could certainly take 1, and omit the logger name and/or level.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Loggers that don't prepend?

2018-11-26 Thread Greg Hendershott
make-log-receiver returns a synchronizable event; you start a thread
to loop and sync on that. Formatting and disposition is up to you.

1. Example from XREPL, displaying to stdout with `;` comment chars prepended:

  
https://github.com/racket/xrepl/blob/master/xrepl-lib/xrepl/xrepl.rkt#L1286-L1307

2. Example from racket-mode, writing to a TCP port...

  
https://github.com/greghendershott/racket-mode/blob/b977873e6128f8399432dcd60cc39f6a6f803d9c/racket/logger.rkt

...for the Emacs front-end to read from, and do things like color-code
the log levels, then display in a dedicated window:

  https://github.com/greghendershott/racket-mode/blob/master/racket-logger.el

3. I have also done a log-receiver that ships log events as JSON to
AWS CloudWatch Logs, for https://deals.extramaze.com but that code
isn't open source now.

Log receivers are fun.

Anyway you could certainly take 1, and omit the logger name and/or level.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Loggers that don't prepend?

2018-11-26 Thread David Storrs
On Mon, Nov 26, 2018 at 6:20 PM Shu-Hung You <
shu-hung@eecs.northwestern.edu> wrote:

> I think it depends on the code that logs the message, not the logger.
> In the log-message function, the topic and the prefix-message?
> arguments together control whether the message will be prefixed by the
> topic and ": " or not.
>

I can't believe I missed that.  Thanks.



> On Mon, Nov 26, 2018 at 5:00 PM David Storrs 
> wrote:
> >
> > Is there a way to have a logger that prints the message I give it
> without modification?  (i.e. without prepending the topic or anything else)
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to racket-users+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Loggers that don't prepend?

2018-11-26 Thread Shu-Hung You
I think it depends on the code that logs the message, not the logger.
In the log-message function, the topic and the prefix-message?
arguments together control whether the message will be prefixed by the
topic and ": " or not.
On Mon, Nov 26, 2018 at 5:00 PM David Storrs  wrote:
>
> Is there a way to have a logger that prints the message I give it without 
> modification?  (i.e. without prepending the topic or anything else)
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Loggers that don't prepend?

2018-11-26 Thread David Storrs
Is there a way to have a logger that prints the message I give it without
modification?  (i.e. without prepending the topic or anything else)

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.