[
https://issues.apache.org/jira/browse/ATLAS-3610?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mariusz Górski updated ATLAS-3610:
----------------------------------
Description:
*Problem description*
When starting Atlas, Python scripts are invoked to spawn all necessary
processes. This is achieved with the use of _subprocess.Popen()_ in
_runProcess()_ function of _atlas_config.py_ script. While doing that, stdout
is being redirected to log files, which (for java processes) can override log4j
configuration (if configured with stdout handler). This creates situation when
log4j configuration cannot be relied upon and prevents logging to stdout.
*Proposed solution*
* Add possibility to unify logging logic by relying solely on log4j
configuration.
* Adjust _runProcess()_ function from _atlas_config.py_ script (and all
functions relying on it) not to redirect stdout and stderr of spawned processes
when logdir is _None_
* Add _RELY_ON_LOG4J_ONLY_ env variable (defaulting to False) for backwards
compatibility.
*Predicted Benefits*
This improvement would bring the benefit of having single place where logging
logic is defined (log4j config file) and enable logging to stdout, which could
be very useful when running Atlas in docker container or in Kubernetes/OC,
where some logging scraping is present.
was:
*Problem description*
When starting Atlas, Python scripts are invoked to spawn all necessary
processes. This is achieved with the use of _subprocess.Popen()_ in
_runProcess()_ function of _atlas_config.py_ script. While doing that, stdout
is being redirected to log files, which (for java processes) can override log4j
configuration (if configured with stdout handler). This creates situation when
log4j configuration cannot be relied upon and prevents logging to stdout.
*Proposed solution*
Unify logging logic by relying solely on log4j configuration. Adjust
_runProcess()_ function from _atlas_config.py_ script (and all functions
relying on it) not to redirect stdout and stderr of spawned processes.
*Predicted Benefits*
This improvement would bring the benefit of having single place where logging
logic is defined (log4j config file) and enable logging to stdout, which could
be very useful when running Atlas in docker container or in Kubernetes/OC,
where some logging scraping is present.
> Unify logging logic by relying solely on log4j configuration for java
> processes
> -------------------------------------------------------------------------------
>
> Key: ATLAS-3610
> URL: https://issues.apache.org/jira/browse/ATLAS-3610
> Project: Atlas
> Issue Type: Improvement
> Components: atlas-core
> Affects Versions: 3.0.0
> Reporter: Mariusz Górski
> Priority: Minor
> Fix For: 3.0.0
>
>
> *Problem description*
> When starting Atlas, Python scripts are invoked to spawn all necessary
> processes. This is achieved with the use of _subprocess.Popen()_ in
> _runProcess()_ function of _atlas_config.py_ script. While doing that, stdout
> is being redirected to log files, which (for java processes) can override
> log4j configuration (if configured with stdout handler). This creates
> situation when log4j configuration cannot be relied upon and prevents logging
> to stdout.
> *Proposed solution*
> * Add possibility to unify logging logic by relying solely on log4j
> configuration.
> * Adjust _runProcess()_ function from _atlas_config.py_ script (and all
> functions relying on it) not to redirect stdout and stderr of spawned
> processes when logdir is _None_
> * Add _RELY_ON_LOG4J_ONLY_ env variable (defaulting to False) for backwards
> compatibility.
> *Predicted Benefits*
> This improvement would bring the benefit of having single place where logging
> logic is defined (log4j config file) and enable logging to stdout, which
> could be very useful when running Atlas in docker container or in
> Kubernetes/OC, where some logging scraping is present.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)