{"id":20877442,"url":"https://github.com/t1/jax-rs-logging","last_synced_at":"2025-05-12T16:30:35.792Z","repository":{"id":38311878,"uuid":"475742635","full_name":"t1/jax-rs-logging","owner":"t1","description":"Debug-log all http traffic via JAX-RS or MicroProfile REST Client; server and client side","archived":false,"fork":false,"pushed_at":"2024-10-21T18:54:32.000Z","size":72,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"trunk","last_synced_at":"2024-10-22T11:17:31.938Z","etag":null,"topics":["jakarta-ee","java-ee","jax-rs","jee","logging","microprofile-restclient"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/t1.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-30T06:10:02.000Z","updated_at":"2024-10-21T18:54:35.000Z","dependencies_parsed_at":"2022-08-17T15:55:36.755Z","dependency_job_id":"570bdc0d-ded7-44f2-9936-4e372a12f5f4","html_url":"https://github.com/t1/jax-rs-logging","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t1%2Fjax-rs-logging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t1%2Fjax-rs-logging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t1%2Fjax-rs-logging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t1%2Fjax-rs-logging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/t1","download_url":"https://codeload.github.com/t1/jax-rs-logging/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253776657,"owners_count":21962521,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jakarta-ee","java-ee","jax-rs","jee","logging","microprofile-restclient"],"created_at":"2024-11-18T06:57:02.587Z","updated_at":"2025-05-12T16:30:35.779Z","avatar_url":"https://github.com/t1.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"= JAX-RS Logging image:https://maven-badges.herokuapp.com/maven-central/com.github.t1/jax-rs-logging/badge.svg[link=https://search.maven.org/artifact/com.github.t1/jax-rs-logging] image:https://github.com/t1/jax-rs-logging/actions/workflows/maven.yml/badge.svg[link=https://github.com/t1/jax-rs-logging/actions/workflows/maven.yml]\n\n//image:https://maven-badges.herokuapp.com/maven-central/com.github.t1/jax-rs-logging/badge.svg[link=https://search.maven.org/artifact/com.github.t1/jax-rs-logging]\n\nLog all http traffic coming in or going out with JAX-RS, i.e. request/status, headers and (text)body coming in and returned by a server as well as sending out and receiving back by a client.\n\nIt logs at `DEBUG` level using https://www.slf4j.org[slf4j].\n\nIt tries to find out what API class was used (or fall back to a generic logger), e.g. when you use MP REST Client, it uses the name of the client API interface as the logger.\nOn the server, I didn't find a standardized way to find out what API class handles the request; so that works currently only for RestEasy... any hints are very welcome.\n\nIf the logger is not enabled (at `DEBUG` level), it looks for a logger config with an additional `..single` suffix, i.e. if the method is `test.Ping#ping` and `test.Ping.ping` is disabled, it looks if `test.Ping.ping..single` or `test.Ping..single` or `test..single` or `..single` or the root logger is enabled.\nIn this case, it logs the request and response in a single multi-line log invocation.\nIf that is still disabled, it logs nothing.\n\nIt logs the `Authorization` header value as `\u003chidden\u003e`; with one exception: we consider passwords in a `Basic` auth with at least 12 characters to be safe enough, so we can log the username and only hide the password.\nThis often makes debugging issues with credentials easier, as it easily happens that you use the _wrong credentials_, but it's much less likely that you use the _wrong password_ for the correct user.\n\nIt joins repeated headers into a single, comma separated log line.\n\nTo use it, simply add it to your runtime classpath.\n\nDepending on the direction, different prefixes are logged:\n\n|===\n|Side |Direction |Prefix\n\n|Client |Call |`\u003e\u003e`\n|Client |Result |`\u003c\u003c`\n\n|Container |Receive |`\u003e\u003e\u003e`\n|Container |Return |`\u003c\u003c\u003c`\n|===\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft1%2Fjax-rs-logging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft1%2Fjax-rs-logging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft1%2Fjax-rs-logging/lists"}