You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by "javastuff.sam@gmail.com" <ja...@gmail.com> on 2017/03/14 00:57:16 UTC

Re: REST service command LOG

Hi Val,

Apologies for coming back to this thread late.

I agree for security reasons it should internally figure out which log file
to read. However it does not work, here is the scenario -

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. 
I have to enforce either of the workaround - 
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.

I think when Ignite-log4j module is enabled it should make Ignite aware of
logging configuration. 

Thanks,
-Sam



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/REST-service-command-LOG-tp10148p11158.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: REST service command LOG

Posted by ekraynov <ev...@epam.com>.
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>
  
  ...
</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



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: REST service command LOG

Posted by "javastuff.sam@gmail.com" <ja...@gmail.com>.
Created minor ticket IGNITE-4845




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/REST-service-command-LOG-tp10148p11325.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: REST service command LOG

Posted by vkulichenko <va...@gmail.com>.
Hi Sam,

This makes sense to me. Can you create a ticket and put your thoughts there?
Contributions are also very welcome ;)

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/REST-service-command-LOG-tp10148p11162.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.