For clarity, that line where I call: (make '() req)
Is the one that's failing because '() is clearly not a "connection". Thanks! Luke On Fri, Nov 11, 2016 at 2:18 PM, Luke Bayes <lukeba...@gmail.com> wrote: > Disclaimer: I'm a long-time software engineer, but very new to Lisp/Scheme > and even newer to Racket. Please bear with me! > > I have a basic web-server working that has handlers configured for > different routes. I can return markup for GET requests and process params > on POST requests with different handlers. Woot! > > At this point, I'm struggling to get visibility into the running process. > > When I attempt to display or print content to stdout, it seems the > servlet holds these messages until it is killed. > > I've found some information about the logging services included with the > web-server module here: > > http://docs.racket-lang.org/web-server-internal/dispatch-log.html > > But this just tells me about the API for the logging internals and it's > still unclear to me how to wire up a logger. I've tried to call this > constructor, but I don't have a "connection" object to provide it. > > I'm certain (as per usual) that I'm missing something simple, any help > would be appreciated. > > For the record, I'm using the (server/servlet handler params ...) > structure to configure the server as this seemed simpler than the > configuration-table details that I haven't been able to get working. > > Here is the basic start call that I have: > > #lang racket > > (require web-server/http > web-server/servlet > web-server/servlet-env > web-server/dispatchers/dispatch-log > "./home-get.rkt" > "./sign-in-get.rkt" > "./sign-in-post.rkt" > "./register-get.rkt" > "./register-post.rkt") > > (provide authentication-routes) > > (define (authentication-routes req) > ((make) '() req) > (dispatch req)) > > (define-values (dispatch req) > (dispatch-rules > [("") home-get] > [("sign-in") #:method "post" sign-in-post] > [("sign-in") sign-in-get] > [("register") #:method "post" register-post] > [("register") register-get])) > > I'm starting this servlet with with the following command: > > racket src/authentication-main.rkt > > My concrete questions are: > > 1) How do I get my servlet code to print to stdout? > > 2) How do I insert the transparent request logger in my dispatch-rules so > that request info will be shown on stdout? > > 3) How should I connect topic-based loggers in my servlet modules and see > the output on stdout? > > > Thanks! > > Luke > > -- 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.