https://kotlinlang.org logo
#kobweb
Title
# kobweb
j

jeff

03/01/2024, 7:14 PM
Two Questions, both related to debugging: 1. how can I attach a debugger to my (jvm) kobweb server? The only gradle task I see to run the server is
kobwebStart
but that detaches the actual server process. 2. can I get an instance of
Logger
outside of a request context? e.g. to log some things on server initialization?
d

David Herman

03/01/2024, 7:23 PM
For 2, you can get a logger inside an
InitApi
method: https://github.com/varabyte/kobweb#initapi-methods-and-initializing-services Would that be enough for you?
j

jeff

03/01/2024, 7:23 PM
Ah nice! Missed that, sorry.
d

David Herman

03/01/2024, 7:24 PM
It's all good! The README is massive.
j

jeff

03/01/2024, 7:24 PM
InitApi
should work, let me try it
👍 1
d

David Herman

03/01/2024, 7:24 PM
You asking questions like this actually helps the community be aware of stuff like this so I appreciate it
🎉 1
j

jeff

03/02/2024, 10:28 PM
Forgot to follow up but yes, InitApi was perfect. 🎉
d

David Herman

03/02/2024, 10:56 PM
Thanks for the follow-up. Glad to hear it worked!
4 Views