neils-dev opened a new pull request, #3706:
URL: https://github.com/apache/ozone/pull/3706

   ## What changes were proposed in this pull request?
   
   Pull request includes small patch to override the hardcoded filename of 
ozone sh log with a user defined log filename.  Currently, the ozone sh log is 
set to `ozone-shell.log`.  This PR provides a patch to let the user set the log 
filename by defining the filename in the $`OZONE_SH_OPTS` environment variable. 
 This is done by appending the $OZONE_SH_OPTS environment variable to the 
service loader options included with the 
`org.apache.hadoop.ozone.shell.OzoneShell` class when it is loaded. 
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-7153
   
   ## How was this patch tested?
   
   Manually tested with docker development cluster.
   
   `docker-compose exec scm bash`
   with default user hadoop:
   `ozone sh`
   (creates log file in /var/log/hadoop/ozone-shell.log)
   
   switch to anotheruser.
   
   ```
   [anotheruser@4191962bed25 hadoop]$ export OZONE_LOGFILE=mytest
   export OZONE_SH_OPTS="-Dhadoop.log.file=${OZONE_LOGFILE}"
   ozone sh
   ```
   (creates log file in /var/log/hadoop/mytest)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to