Edit the log4j property template in which default log4j properties
reside, and use those customizations to overwrite the custom log4j properties for each service
to control logging activities for that service.
Ambari uses sets of properties called Log4j
properties to control logging activities for each service running in your Hadoop
cluster. Initially, default values for each property reside in the log4j property group.
To customize log settings, first access the Log4j property group for the service. Then,
edit the log4j template, and save a service-specific version of property values appropriate
to control log activities for the service, in custom [SERVICE_NAME]log4j
properties.-
In Ambari Web, browse to .
-
Edit values of any properties in the [SERVICE_NAME] log4j
template.
-
Copy the content of the log4j template file.
-
Browse to the custom [SERVICE_NAME]log4j properties
group.
-
Paste the copied content into custom [SERVICE_NAME]log4j
properties, overwriting, the default content.
-
In Configs, click Save.
-
Review and confirm any recommended, related configuration changes, as
prompted.
-
Restart affected components and services, as prompted.
Restarting components in the service pushes the configuration properties displayed
in Custom log4j.properites to each host running components for
that service.
If you have customized logging properties that define how activities for each service are
logged, you see refresh indicators next to each service name. Ensure that logging
properties displayed in Custom logj4.properties include any
customization.
Optionally, you can create configuration groups that include
custom logging properties.