Hi Robin, Instructions for setting log levels via the LogConfigurationTask can be found in the docs here: https://www.dropwizard.io/en/latest/manual/core.html#logging-configuration-via-http
^ This contains example curl requests using the default admin ports The logging section of the user guide also describes all methods of configuring logging should you need something that's a bit more durable than http config https://www.dropwizard.io/en/latest/manual/core.html#logging Does that give you enough to work from? On Friday, June 26, 2020 at 10:47:26 PM UTC-7 [email protected] wrote: > Hello all, > > I need help in enabling/disabling log levels in dropwizzard micro service. > > In the logs I see below snippet. > > ----------------- > INFO [2020-06-27 05:29:10,087] > org.eclipse.jetty.server.handler.ContextHandler: Started > i.d.j.MutableServletContextHandler@2aea717c{/insight-server/api/1.0,null,AVAILABLE} > INFO [2020-06-27 05:29:10,132] io.dropwizard.setup.AdminEnvironment: > tasks = > > POST /tasks/log-level > (io.dropwizard.servlets.tasks.LogConfigurationTask) > POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) > > INFO [2020-06-27 05:29:11,267] > io.dropwizard.jersey.DropwizardResourceConfig: The following paths were > found for the configured resources: > > DELETE / > (oracle.mtms.infra.services.jersey.admin.AdminServicesResource) > GET /checkState > (oracle.mtms.infra.services.jersey.admin.AdminServicesResource) > GET /health > (oracle.mtms.infra.services.jersey.admin.AdminServicesResource) > GET /liveness > (oracle.mtms.infra.services.jersey.admin.AdminServicesResource) > GET /logback/status > (oracle.mtms.infra.services.jersey.admin.AdminServicesResource) > GET /readiness > (oracle.mtms.infra.services.jersey.admin.AdminServicesResource) > GET /start > (oracle.mtms.infra.services.jersey.admin.AdminServicesResource) > DELETE /status > (oracle.mtms.infra.services.jersey.admin.AdminServicesResource) > GET /status > (oracle.mtms.infra.services.jersey.admin.AdminServicesResource) > ------------------- > > I know we need to use /tasks/log-level for changing the log levels via > REST API. > > Am not sure what is the default admin port to be used while invoking the > REST API. I have not configured any admin port in my microservice. > > Can someone help me the right curl command to do this? > For e.g. I want to enable foo.bar package logs with DEBUG level. > > thanks, > Robin Kuttaiah > -- You received this message because you are subscribed to the Google Groups "dropwizard-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dropwizard-user/be343d26-e66e-4a57-a8c7-202a12f3388an%40googlegroups.com.
