Closed boogsbunny closed 4 months ago
I would think that the middleware should execute before the app?
Precisely speaking, it can run before and after apps.
If you want to output logs before the app, move the logging code before (funcall app env)
.
I don't know why the app log is written twice, though.
Thanks, that works!
Yes, the app execution happened because I called (funcall app env)
twice in some other middleware that I omitted here.
Hey, I'm using the
builder
macro to define my clack application like so:where
use-logger
is my custom middleware:What I've observed from the logs as written above is that the execution order looks like this:
I would think that the middleware should execute before the app? And the app is executed twice too? I have the same issue if I use snooze for example with custom routes instead of this app example.