There are 2 ways to do it.
1. Use commands hadoop daemonlog. Like hadoop daemonlog -setlevel <rm host:rm httport> <full class name including package name| or package name itself only> <level>
Here are some examples
hadoop daemonlog -setlevel <rm host:rm httport> org.apache.hadoop.yarn.server.resourcemanager DEBUG
Or to enable debug log on full use something like:
hadoop daemonlog -setlevel <rm host:rm httport> org.apache.hadoop.yarn DEBUG
Daemonlog reference help "Running Daemonlog make sure are yarn/hdfs cluster admin, e.g. you are part of yarn.admin.acl in case of yarn
2: Via, Namenode/Resourcemanger etc.. access daemon UI like http://<daamonhost>:<httpPort>/logLevel?log, then fill package/classname in test box shown in second row along with desried logging (like DEBUG) here, click "Set Log Level" button.
Using either of make sure use have web authenticatio on and you are part cluster admin group or
default static web user (which dr.who) is part of cluster admin group