ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "kcheng.mvp" <kcheng....@gmail.com>
Subject log4j on server node (log no print)
Date Wed, 29 Jun 2016 09:57:03 GMT
Here is my configuration

------------ client node------------ 

1: IgniteBean
<bean id="ignite" class="org.apache.ignite.IgniteSpringBean">
        <property name="configuration" ref="ignite.cfg"/>
    </bean>

    <bean id="ignite.cfg"
class="org.apache.ignite.configuration.IgniteConfiguration">
        <property name="clientMode" value="true"/>
        <property name="peerClassLoadingEnabled" value="true"/>
        <property name="cacheConfiguration">
            <list>
                
                <bean
class="org.apache.ignite.configuration.CacheConfiguration">
                    <property name="atomicityMode" value="ATOMIC"/>
                    <property name="backups" value="1"/>
                </bean>
            </list>
        </property>

2: log4j2 dependency on the client node

<dependency>
            <groupId>org.apache.ignite</groupId>
            <artifactId>ignite-core</artifactId>
            <version>${ignite.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ignite</groupId>
            <artifactId>ignite-spring</artifactId>
            <version>${ignite.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ignite</groupId>
            <artifactId>ignite-indexing</artifactId>
            <version>${ignite.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ignite</groupId>
            <artifactId>ignite-log4j2</artifactId>
            <version>${ignite.version}</version>
        </dependency>


------------ server node------------ 

1: copy ${IGNITE_HOME}\libs\optional\ignite-log4j2 to ${IGNITE_HOME}\libs



* issues*
-----------------Execute below code from client node -------------

*I can see the log from client node, but I can not see the log in the server
node*


import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;



private static final Logger logger =
LogManager.getLogger(DecompilerService.class);


public void dummyService() {
        ExecutorService exec = ignite.executorService();
        for (final String word : "aBCDEFG djdjdjdjdjdjdjdjd 11111111 Print
words using runnable".split(" ")) {
            // Execute runnable on some node.
            exec.submit(new IgniteRunnable() {
                @Override
                public void run() {
                    logger.info(">>> Printing '" + word + "' on this node
from grid job.");
                }
            });
        }
    }











--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/log4j-on-server-node-log-no-print-tp5988.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message