You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "adoroszlai (via GitHub)" <gi...@apache.org> on 2025/04/09 14:11:29 UTC
[PR] HDDS-12805. Use slf4j for HttpRequestLog [ozone]
adoroszlai opened a new pull request, #8255:
URL: https://github.com/apache/ozone/pull/8255
## What changes were proposed in this pull request?
Configure Jetty in Ozone to use SLF4J for request log instead of Apache Commons Logging.
Q: should we add default config for logging to separate file instead of the normal log?
https://issues.apache.org/jira/browse/HDDS-12805
## How was this patch tested?
```
$ cd hadoop-ozone/dist/target/ozone-2.1.0-SNAPSHOT/compose/ozone
$ OZONE_DATANODES=3 ./run.sh -d
$ open http://localhost:9876/
$ docker compose logs scm | grep requests.scm
scm-1 | 2025-04-09 11:25:07,515 [qtp1806062974-448] INFO requests.scm: 172.17.0.1 - - [09/Apr/2025:11:25:07 +0000] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 ..."
scm-1 | 2025-04-09 11:25:07,520 [qtp1806062974-456] INFO requests.scm: 172.17.0.1 - - [09/Apr/2025:11:25:07 +0000] "GET /static/bootstrap-3.4.1/js/bootstrap.min.js HTTP/1.1" 200 39680 "http://localhost:9876/" "Mozilla/5.0 ..."
...
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12805. Use slf4j for HTTP request log [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #8255:
URL: https://github.com/apache/ozone/pull/8255#issuecomment-2794713140
@jojochuang patch is updated, would you like to take another look?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12805. Use slf4j for HTTP request log [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #8255:
URL: https://github.com/apache/ozone/pull/8255#issuecomment-2796048658
Thanks @jojochuang for reviewing and merging this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12805. Use slf4j for HttpRequestLog [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #8255:
URL: https://github.com/apache/ozone/pull/8255#issuecomment-2790586970
> Looks good. So it uses the default log format without customization?
Yes. However, Jetty seems to do some formatting on its own, so dates appear twice. (See example log.)
> > Q: should we add default config for logging to separate file instead of the normal log?
>
> Probably stay with whatever is the current behavior. It is written to the same log file now, correct?
I may be wrong, but I don't think HTTP requests are logged currently. At least I haven't found configs for that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12805. Use slf4j for HttpRequestLog [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #8255:
URL: https://github.com/apache/ozone/pull/8255#issuecomment-2792452886
Added separate log file for HTTP requests:
```
$ docker compose logs | grep 'GET /' | wc -l
0
$ docker compose exec scm wc -l /var/log/hadoop/access.log
11 /var/log/hadoop/access.log
$ docker compose exec om wc -l /var/log/hadoop/access.log
23 /var/log/hadoop/access.log
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12805. Use slf4j for HTTP request log [ozone]
Posted by "jojochuang (via GitHub)" <gi...@apache.org>.
jojochuang merged PR #8255:
URL: https://github.com/apache/ozone/pull/8255
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org