[
https://issues.apache.org/jira/browse/IGNITE-4845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16587464#comment-16587464
]
Evgeny Kraynov commented on IGNITE-4845:
----------------------------------------
Log command of the REST API provides access just for logs of the node where the
service raised.
Logs can be retrieved from IGNITE_HOME/ or from the path defined in the log
configuration of the node.
Log configuration should be defined expliciltly when Ignite-log4j module is
enabled.
XML:
<bean class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="gridLogger">
<bean class="org.apache.ignite.logger.log4j.Log4JLogger">
<constructor-arg type="java.lang.String" value="log4j.xml"/>
</bean>
</property>
<!-- Other Ignite configurations -->
...
</bean>
Java:
IgniteConfiguration cfg = new IgniteConfiguration();
IgniteLogger log = new Log4JLogger("log4j.xml");
cfg.setGridLogger(log);
In this way, Log command will provide by default (without Path parameter) logs
from the file specified
in log4j.xml
I think, the current behavior is correct
> REST LOG API does not work when Ignite-log4j module is enabled
> --------------------------------------------------------------
>
> Key: IGNITE-4845
> URL: https://issues.apache.org/jira/browse/IGNITE-4845
> Project: Ignite
> Issue Type: Bug
> Components: clients
> Affects Versions: 1.8
> Reporter: Sam
> Priority: Minor
> Labels: newbie
>
> For security reason Ignite should internally figure out which log file to
> read so Path parameter does not make sense.
> Ignite-log4j module is enabled simply including this jar file, now it uses my
> application log4j configuration to log successfully. But ignite.log() is
> never initialized, it is null, hence REST API not able to figure out where is
> the log file.
> enforcing either of below workaround works -
> 1. Log file location need to start with IGNITE_HOME and use Path parameter in
> LOG command.
> 2. Enforce logging into IGNITE_HOME/work/log/ignite.log location.
> when Ignite-log4j module is enabled it should make Ignite aware of logging
> configuration.
> More details @
> [http://apache-ignite-users.70518.x6.nabble.com/REST-service-command-LOG-td10148.html#a11158]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)