You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "jojochuang (via GitHub)" <gi...@apache.org> on 2025/07/04 10:58:12 UTC
[PR] HDDS-13383. Improve Logs in Ozone documentation. [ozone]
jojochuang opened a new pull request, #8744:
URL: https://github.com/apache/ozone/pull/8744
## What changes were proposed in this pull request?
HDDS-13383. Improve Logs in Ozone documentation.
Please describe your PR in detail:
* The "Logs in Ozone" page was not very helpful. This patch improves it by:
- Documenting which roles produce logs and how to configure them.
- Documenting which roles produce audit logs and include a sample.
- Explaining how to enable debug logs for both services and CLI tools.
* Generated by Google Gemini Pro 2.5 + Gemini Cli. Prompt:
> Read jira https://issues.apache.org/jira/browse/HDDS-13383 and implement it.
Tokens used:
```
│ Input Tokens 1,816,715 │
│ Output Tokens 3,985 │
│ Thoughts Tokens 5,714 │
│ ───────────────────────────── │
│ Total Tokens 1,826,414 │
│ │
│ Total duration (API) 2m 38s │
```
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-13383
## How was this patch tested?
Draft prepared by Gemini, reviewed and followed the cli instructions to confirm correctness.
--
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-13383. Improve Logs in Ozone documentation. [ozone]
Posted by "jojochuang (via GitHub)" <gi...@apache.org>.
jojochuang commented on PR #8744:
URL: https://github.com/apache/ozone/pull/8744#issuecomment-3054123147
Merged. Thanks @ayushtkn
--
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-13383. Improve Logs in Ozone documentation. [ozone]
Posted by "jojochuang (via GitHub)" <gi...@apache.org>.
jojochuang merged PR #8744:
URL: https://github.com/apache/ozone/pull/8744
--
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-13383. Improve Logs in Ozone documentation. [ozone]
Posted by "ayushtkn (via GitHub)" <gi...@apache.org>.
ayushtkn commented on code in PR #8744:
URL: https://github.com/apache/ozone/pull/8744#discussion_r2195475786
##########
hadoop-hdds/docs/content/tools/LogsInOzone.md:
##########
@@ -42,4 +70,39 @@ appender.rolling.strategy.delete.ifLastModified.type=IfLastModified
appender.rolling.strategy.delete.ifLastModified.age=30d
```
-For more details, please check [Log4j2 Delete on Rollover](https://logging.apache.org/log4j/2.x/manual/appenders.html#CustomDeleteOnRollover).
\ No newline at end of file
+For more details, please check [Log4j2 Delete on Rollover](https://logging.apache.org/log4j/2.x/manual/appenders.html#CustomDeleteOnRollover).
+
+## Debugging
+
+You can increase the log verbosity for debugging purposes for both services and CLI tools.
+
+### Enabling Debug Logs for Services
+
+To enable debug logging for a service, you need to modify its `log4j.properties` file. Change the log level for the desired logger from `INFO` to `DEBUG`. For example, to enable debug logging for the Ozone Manager, you would edit its `log4j.properties` and change the following line:
+
+```
+rootLogger.level = info
+```
+
+to:
+
+```
+rootLogger.level = debug
+```
+
+After saving the file, the service will start logging more detailed debug information.
Review Comment:
After saving the file & `restarting the service`?
--
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-13383. Improve Logs in Ozone documentation. [ozone]
Posted by "jojochuang (via GitHub)" <gi...@apache.org>.
jojochuang commented on code in PR #8744:
URL: https://github.com/apache/ozone/pull/8744#discussion_r2195522797
##########
hadoop-hdds/docs/content/tools/LogsInOzone.md:
##########
@@ -42,4 +70,39 @@ appender.rolling.strategy.delete.ifLastModified.type=IfLastModified
appender.rolling.strategy.delete.ifLastModified.age=30d
```
-For more details, please check [Log4j2 Delete on Rollover](https://logging.apache.org/log4j/2.x/manual/appenders.html#CustomDeleteOnRollover).
\ No newline at end of file
+For more details, please check [Log4j2 Delete on Rollover](https://logging.apache.org/log4j/2.x/manual/appenders.html#CustomDeleteOnRollover).
+
+## Debugging
+
+You can increase the log verbosity for debugging purposes for both services and CLI tools.
+
+### Enabling Debug Logs for Services
+
+To enable debug logging for a service, you need to modify its `log4j.properties` file. Change the log level for the desired logger from `INFO` to `DEBUG`. For example, to enable debug logging for the Ozone Manager, you would edit its `log4j.properties` and change the following line:
+
+```
+rootLogger.level = info
+```
+
+to:
+
+```
+rootLogger.level = debug
+```
+
+After saving the file, the service will start logging more detailed debug information.
Review Comment:
Good catch! Updated.
--
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-13383. Improve Logs in Ozone documentation. [ozone]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #8744:
URL: https://github.com/apache/ozone/pull/8744#discussion_r2190560236
##########
hadoop-hdds/docs/content/tools/LogsInOzone.md:
##########
@@ -42,4 +70,39 @@ appender.rolling.strategy.delete.ifLastModified.type=IfLastModified
appender.rolling.strategy.delete.ifLastModified.age=30d
```
-For more details, please check [Log4j2 Delete on Rollover](https://logging.apache.org/log4j/2.x/manual/appenders.html#CustomDeleteOnRollover).
\ No newline at end of file
+For more details, please check [Log4j2 Delete on Rollover](https://logging.apache.org/log4j/2.x/manual/appenders.html#CustomDeleteOnRollover).
+
+## Debugging
+
+You can increase the log verbosity for debugging purposes for both services and CLI tools.
+
+### Enabling Debug Logs for Services
+
+To enable debug logging for a service, you need to modify its `log4j.properties` file. Change the log level for the desired logger from `INFO` to `DEBUG`. For example, to enable debug logging for the Ozone Manager, you would edit its `log4j.properties` and change the following line:
+
+```
+rootLogger.level = info
+```
+
+to:
+
+```
+rootLogger.level = debug
+```
+
+After saving the file, the service will start logging more detailed debug information.
+
+### Enabling Debug Logs for CLI Tools
+
+To enable debug logging for Ozone CLI tools (e.g., `ozone sh volume create`), you can set the `OZONE_ROOT_LOGGER` environment variable to `debug`:
+
+```bash
+export OZONE_ROOT_LOGGER=debug,console
Review Comment:
[nitpick] Recommend using uppercase for log levels in environment variables (e.g., `export OZONE_ROOT_LOGGER=DEBUG,console`) to match Log4j conventions.
```suggestion
export OZONE_ROOT_LOGGER=DEBUG,console
```
--
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