Re: How to configure ignite-jcl and Ignite-slf4j logger

2017-09-05 Thread Rishi Yagnik
Just sending it for your reference -

Copied ignite-log* library in ignite lib folder
Renamed ignite-log4j to log4j.xml for log4j configuration
Renamed ignite-log4j2 to log4j2.xml for log4j configuration
Copied respective log file config in config location so that it can be
picked up during start up of ignite























On Tue, Sep 5, 2017 at 5:52 PM, Valentin Kulichenko <
valentin.kuliche...@gmail.com> wrote:

> Prachi,
>
> Parameter of Log4JLogger constructor is not the path to XML file, it's just
> a name of root logger. Ignite logger configuration should look like this:
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> ignite-log4j.xml file should be renamed to log4j.xml and moved to root of
> classpath (e.g. in 'resources' folder). This way it will be picked up
> automatically.
>
> -Val
>
> On Mon, Sep 4, 2017 at 11:01 PM, Prachi Garg  wrote:
>
> > Valentin, Nikolai,
> >
> > I have published my example on github -
> > https://github.com/pgarg/myIgniteExamples
> >
> > On Mon, Sep 4, 2017 at 7:57 PM, Rishi Yagnik 
> > wrote:
> >
> > > I have configured log4j, log4j-2 in our environment, can share
> additional
> > > details here if you need it.
> > >
> > > On Mon, Sep 4, 2017 at 11:54 AM, Nikolai Tikhonov <
> ntikho...@apache.org>
> > > wrote:
> > >
> > >> Prachi,
> > >>
> > >> I've published on github example with configured JCL logger. Please,
> > have
> > >> a
> > >> look: https://github.com/TikhonovNikolay/jcl-ignite-example
> > >>
> > >> On Sat, Sep 2, 2017 at 12:36 AM, Prachi Garg 
> > wrote:
> > >>
> > >> > Yes, I tried using it, but strangely this is the output I get when
> use
> > >> > -DIGNITE_QUIET=false
> > >> > ( I set this property in Idea ->Run -> Edit Configurations -> VM
> > >> options)
> > >> >
> > >> > log4j:WARN No appenders could be found for logger
> > >> > (org.apache.ignite.internal.util.typedef.G).
> > >> > log4j:WARN Please initialize the log4j system properly.
> > >> > log4j:WARN See http://logging.apache.org/
> log4j/1.2/faq.html#noconfig
> > >> for
> > >> > more info.
> > >> > Sep 01, 2017 2:33:07 PM java.util.logging.LogManager$RootLogger log
> > >> > SEVERE: Failed to resolve default logging config file:
> > >> > config/java.util.logging.properties
> > >> > class org.apache.ignite.internal.GridLoggerProxy
> > >> >
> > >> > Process finished with exit code 0
> > >> >
> > >> >
> > >> > On Fri, Sep 1, 2017 at 2:30 PM, Valentin Kulichenko <
> > >> > valentin.kuliche...@gmail.com> wrote:
> > >> >
> > >> > > Prachi,
> > >> > >
> > >> > > It looks like you're running in quiet mode. Did you try to set
> > >> > > -DIGNITE_QUIET=false
> > >> > > system property?
> > >> > >
> > >> > > -Val
> > >> > >
> > >> > > On Fri, Sep 1, 2017 at 10:43 AM, Prachi Garg 
> > >> wrote:
> > >> > >
> > >> > > > Nikolai,
> > >> > > >
> > >> > > > I have specified 'gridlogger' property in 'IgniteConfiguration',
> > but
> > >> > > looks
> > >> > > > like it does not get instantiated.
> > >> > > >
> > >> > > >  > >> > > > class="org.apache.ignite.configuration.IgniteConfiguration">
> > >> > > >
> > >> > > > 
> > >> > > > 
> > >> > > > 
> > >> > > > 
> > >> > > >  > >> > > > value="/Users/prachig/myexamples/config/ignite-log4j.xml"/>
> > >> > > > 
> > >> > > > 
> > >> > > > 
> > >> > > > 
> > >> > > >
> > >> > > > 
> > >> > > > ...
> > >> > > >
> > >> > > > 
> > >> > > >
> > >> > > >
> > >> > > >
> > >> > > >
> > >> > > > On Fri, Sep 1, 2017 at 10:16 AM, Nikolay Tikhonov <
> > >> > > ntikho...@gridgain.com>
> > >> > > > wrote:
> > >> > > >
> > >> > > > > Hi Denis,
> > >> > > > >
> > >> > > > > JCL it's wrapper for logging system (similar sl4j) which can
> be
> > >> used
> > >> > > > > together with log4j. I guess that JavaDoc correct.
> > >> > > > >
> > >> > > > > On Fri, Sep 1, 2017 at 5:40 PM, Denis Magda <
> dma...@apache.org>
> > >> > wrote:
> > >> > > > >
> > >> > > > > > Nikolai,
> > >> > > > > >
> > >> > > > > > Looking at JCL documentation I see the usage of Log4j
> together
> > >> with
> > >> > > > JCL:
> > >> > > > > >
> > >> > > > > > * 
> > >> > > > > > *  ...
> > >> > > > > > *  property name="gridLogger"
> > >> > > > > > *  bean class="org.apache.ignite.
> > >> > > logger.jcl.JclLogger"
> > >> > > > > > *  constructor-arg type="org.apache.commons.
> > >> > > > > > logging.Log"
> > >> > > > > > *  bean class="org.apache.commons.
> > >> > > > > > logging.impl.Log4JLogger"
> > >> > > > > > *  constructor-arg
> > >> type="java.lang.String"
> > >> > > > > > value="config/ignite-log4j.xml"/
> > >> > > > > > *  /bean
> > >> > > > > > *  /constructor-arg
> > >> > > > > > *  /bean

Re: How to configure ignite-jcl and Ignite-slf4j logger

2017-09-05 Thread Valentin Kulichenko
Prachi,

Parameter of Log4JLogger constructor is not the path to XML file, it's just
a name of root logger. Ignite logger configuration should look like this:











ignite-log4j.xml file should be renamed to log4j.xml and moved to root of
classpath (e.g. in 'resources' folder). This way it will be picked up
automatically.

-Val

On Mon, Sep 4, 2017 at 11:01 PM, Prachi Garg  wrote:

> Valentin, Nikolai,
>
> I have published my example on github -
> https://github.com/pgarg/myIgniteExamples
>
> On Mon, Sep 4, 2017 at 7:57 PM, Rishi Yagnik 
> wrote:
>
> > I have configured log4j, log4j-2 in our environment, can share additional
> > details here if you need it.
> >
> > On Mon, Sep 4, 2017 at 11:54 AM, Nikolai Tikhonov 
> > wrote:
> >
> >> Prachi,
> >>
> >> I've published on github example with configured JCL logger. Please,
> have
> >> a
> >> look: https://github.com/TikhonovNikolay/jcl-ignite-example
> >>
> >> On Sat, Sep 2, 2017 at 12:36 AM, Prachi Garg 
> wrote:
> >>
> >> > Yes, I tried using it, but strangely this is the output I get when use
> >> > -DIGNITE_QUIET=false
> >> > ( I set this property in Idea ->Run -> Edit Configurations -> VM
> >> options)
> >> >
> >> > log4j:WARN No appenders could be found for logger
> >> > (org.apache.ignite.internal.util.typedef.G).
> >> > log4j:WARN Please initialize the log4j system properly.
> >> > log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig
> >> for
> >> > more info.
> >> > Sep 01, 2017 2:33:07 PM java.util.logging.LogManager$RootLogger log
> >> > SEVERE: Failed to resolve default logging config file:
> >> > config/java.util.logging.properties
> >> > class org.apache.ignite.internal.GridLoggerProxy
> >> >
> >> > Process finished with exit code 0
> >> >
> >> >
> >> > On Fri, Sep 1, 2017 at 2:30 PM, Valentin Kulichenko <
> >> > valentin.kuliche...@gmail.com> wrote:
> >> >
> >> > > Prachi,
> >> > >
> >> > > It looks like you're running in quiet mode. Did you try to set
> >> > > -DIGNITE_QUIET=false
> >> > > system property?
> >> > >
> >> > > -Val
> >> > >
> >> > > On Fri, Sep 1, 2017 at 10:43 AM, Prachi Garg 
> >> wrote:
> >> > >
> >> > > > Nikolai,
> >> > > >
> >> > > > I have specified 'gridlogger' property in 'IgniteConfiguration',
> but
> >> > > looks
> >> > > > like it does not get instantiated.
> >> > > >
> >> > > >  >> > > > class="org.apache.ignite.configuration.IgniteConfiguration">
> >> > > >
> >> > > > 
> >> > > > 
> >> > > > 
> >> > > > 
> >> > > >  >> > > > value="/Users/prachig/myexamples/config/ignite-log4j.xml"/>
> >> > > > 
> >> > > > 
> >> > > > 
> >> > > > 
> >> > > >
> >> > > > 
> >> > > > ...
> >> > > >
> >> > > > 
> >> > > >
> >> > > >
> >> > > >
> >> > > >
> >> > > > On Fri, Sep 1, 2017 at 10:16 AM, Nikolay Tikhonov <
> >> > > ntikho...@gridgain.com>
> >> > > > wrote:
> >> > > >
> >> > > > > Hi Denis,
> >> > > > >
> >> > > > > JCL it's wrapper for logging system (similar sl4j) which can be
> >> used
> >> > > > > together with log4j. I guess that JavaDoc correct.
> >> > > > >
> >> > > > > On Fri, Sep 1, 2017 at 5:40 PM, Denis Magda 
> >> > wrote:
> >> > > > >
> >> > > > > > Nikolai,
> >> > > > > >
> >> > > > > > Looking at JCL documentation I see the usage of Log4j together
> >> with
> >> > > > JCL:
> >> > > > > >
> >> > > > > > * 
> >> > > > > > *  ...
> >> > > > > > *  property name="gridLogger"
> >> > > > > > *  bean class="org.apache.ignite.
> >> > > logger.jcl.JclLogger"
> >> > > > > > *  constructor-arg type="org.apache.commons.
> >> > > > > > logging.Log"
> >> > > > > > *  bean class="org.apache.commons.
> >> > > > > > logging.impl.Log4JLogger"
> >> > > > > > *  constructor-arg
> >> type="java.lang.String"
> >> > > > > > value="config/ignite-log4j.xml"/
> >> > > > > > *  /bean
> >> > > > > > *  /constructor-arg
> >> > > > > > *  /bean
> >> > > > > > *  /property
> >> > > > > > *  ...
> >> > > > > > * 
> >> > > > > >
> >> > > > > >
> >> > > > > > or
> >> > > > > >
> >> > > > > > * And the same configuration if you'd like to configure Ignite
> >> in
> >> > > your
> >> > > > > > code:
> >> > > > > > * 
> >> > > > > > *  IgniteConfiguration cfg = new IgniteConfiguration();
> >> > > > > > *  ...
> >> > > > > > *  IgniteLogger log = new JclLogger(new
> >> > > Log4JLogger("config/ignite-
> >> > > > > > log4j.xml"));
> >> > > > > > *  ...
> >> > > > > > *  cfg.setGridLogger(log);
> >> > > > > > * 
> >> > > > > >
> >> > > > > >
> >> > > > > > Is it wrong? Could you fix the Java Doc in a proper way?
> >> > > > > >
> >> > > > > >
> >> > > > > > > On Sep 1, 2017, at 3:12 AM, Nikolai Tikhonov <
> >> > 

Re: How to configure ignite-jcl and Ignite-slf4j logger

2017-09-05 Thread Prachi Garg
Valentin, Nikolai,

I have published my example on github -
https://github.com/pgarg/myIgniteExamples

On Mon, Sep 4, 2017 at 7:57 PM, Rishi Yagnik  wrote:

> I have configured log4j, log4j-2 in our environment, can share additional
> details here if you need it.
>
> On Mon, Sep 4, 2017 at 11:54 AM, Nikolai Tikhonov 
> wrote:
>
>> Prachi,
>>
>> I've published on github example with configured JCL logger. Please, have
>> a
>> look: https://github.com/TikhonovNikolay/jcl-ignite-example
>>
>> On Sat, Sep 2, 2017 at 12:36 AM, Prachi Garg  wrote:
>>
>> > Yes, I tried using it, but strangely this is the output I get when use
>> > -DIGNITE_QUIET=false
>> > ( I set this property in Idea ->Run -> Edit Configurations -> VM
>> options)
>> >
>> > log4j:WARN No appenders could be found for logger
>> > (org.apache.ignite.internal.util.typedef.G).
>> > log4j:WARN Please initialize the log4j system properly.
>> > log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig
>> for
>> > more info.
>> > Sep 01, 2017 2:33:07 PM java.util.logging.LogManager$RootLogger log
>> > SEVERE: Failed to resolve default logging config file:
>> > config/java.util.logging.properties
>> > class org.apache.ignite.internal.GridLoggerProxy
>> >
>> > Process finished with exit code 0
>> >
>> >
>> > On Fri, Sep 1, 2017 at 2:30 PM, Valentin Kulichenko <
>> > valentin.kuliche...@gmail.com> wrote:
>> >
>> > > Prachi,
>> > >
>> > > It looks like you're running in quiet mode. Did you try to set
>> > > -DIGNITE_QUIET=false
>> > > system property?
>> > >
>> > > -Val
>> > >
>> > > On Fri, Sep 1, 2017 at 10:43 AM, Prachi Garg 
>> wrote:
>> > >
>> > > > Nikolai,
>> > > >
>> > > > I have specified 'gridlogger' property in 'IgniteConfiguration', but
>> > > looks
>> > > > like it does not get instantiated.
>> > > >
>> > > > > > > > class="org.apache.ignite.configuration.IgniteConfiguration">
>> > > >
>> > > > 
>> > > > 
>> > > > 
>> > > > 
>> > > > > > > > value="/Users/prachig/myexamples/config/ignite-log4j.xml"/>
>> > > > 
>> > > > 
>> > > > 
>> > > > 
>> > > >
>> > > > 
>> > > > ...
>> > > >
>> > > > 
>> > > >
>> > > >
>> > > >
>> > > >
>> > > > On Fri, Sep 1, 2017 at 10:16 AM, Nikolay Tikhonov <
>> > > ntikho...@gridgain.com>
>> > > > wrote:
>> > > >
>> > > > > Hi Denis,
>> > > > >
>> > > > > JCL it's wrapper for logging system (similar sl4j) which can be
>> used
>> > > > > together with log4j. I guess that JavaDoc correct.
>> > > > >
>> > > > > On Fri, Sep 1, 2017 at 5:40 PM, Denis Magda 
>> > wrote:
>> > > > >
>> > > > > > Nikolai,
>> > > > > >
>> > > > > > Looking at JCL documentation I see the usage of Log4j together
>> with
>> > > > JCL:
>> > > > > >
>> > > > > > * 
>> > > > > > *  ...
>> > > > > > *  property name="gridLogger"
>> > > > > > *  bean class="org.apache.ignite.
>> > > logger.jcl.JclLogger"
>> > > > > > *  constructor-arg type="org.apache.commons.
>> > > > > > logging.Log"
>> > > > > > *  bean class="org.apache.commons.
>> > > > > > logging.impl.Log4JLogger"
>> > > > > > *  constructor-arg
>> type="java.lang.String"
>> > > > > > value="config/ignite-log4j.xml"/
>> > > > > > *  /bean
>> > > > > > *  /constructor-arg
>> > > > > > *  /bean
>> > > > > > *  /property
>> > > > > > *  ...
>> > > > > > * 
>> > > > > >
>> > > > > >
>> > > > > > or
>> > > > > >
>> > > > > > * And the same configuration if you'd like to configure Ignite
>> in
>> > > your
>> > > > > > code:
>> > > > > > * 
>> > > > > > *  IgniteConfiguration cfg = new IgniteConfiguration();
>> > > > > > *  ...
>> > > > > > *  IgniteLogger log = new JclLogger(new
>> > > Log4JLogger("config/ignite-
>> > > > > > log4j.xml"));
>> > > > > > *  ...
>> > > > > > *  cfg.setGridLogger(log);
>> > > > > > * 
>> > > > > >
>> > > > > >
>> > > > > > Is it wrong? Could you fix the Java Doc in a proper way?
>> > > > > >
>> > > > > >
>> > > > > > > On Sep 1, 2017, at 3:12 AM, Nikolai Tikhonov <
>> > ntikho...@apache.org
>> > > >
>> > > > > > wrote:
>> > > > > > >
>> > > > > > > Hello Prachi!
>> > > > > > >
>> > > > > > > You need to set gridLogger property in IgniteConfiguration and
>> > > remove
>> > > > > > ignite-log4j dependency from POM file.
>> > > > > > >
>> > > > > > > For example for Sl4j logger:
>> > > > > > >
>> > > > > > > igniteConfiguration.setGridLogger(new Slf4jLogger());
>> > > > > > >
>> > > > > > > and for Jc logger:
>> > > > > > >
>> > > > > > > igniteConfiguration.setGridLogger(new JclLogger());
>> > > > > > >
>> > > > > > > On Fri, Sep 1, 2017 at 2:44 AM, Prachi Garg <
>> pg...@gridgain.com
>> > > > > > > > > > > pg...@gridgain.com>> wrote:
>> > > > > > > Engineers,
>> > > > > > >
>> > > > > > > In the attempt to document loggers 

Re: How to configure ignite-jcl and Ignite-slf4j logger

2017-09-04 Thread Rishi Yagnik
I have configured log4j, log4j-2 in our environment, can share additional
details here if you need it.

On Mon, Sep 4, 2017 at 11:54 AM, Nikolai Tikhonov 
wrote:

> Prachi,
>
> I've published on github example with configured JCL logger. Please, have a
> look: https://github.com/TikhonovNikolay/jcl-ignite-example
>
> On Sat, Sep 2, 2017 at 12:36 AM, Prachi Garg  wrote:
>
> > Yes, I tried using it, but strangely this is the output I get when use
> > -DIGNITE_QUIET=false
> > ( I set this property in Idea ->Run -> Edit Configurations -> VM options)
> >
> > log4j:WARN No appenders could be found for logger
> > (org.apache.ignite.internal.util.typedef.G).
> > log4j:WARN Please initialize the log4j system properly.
> > log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
> > more info.
> > Sep 01, 2017 2:33:07 PM java.util.logging.LogManager$RootLogger log
> > SEVERE: Failed to resolve default logging config file:
> > config/java.util.logging.properties
> > class org.apache.ignite.internal.GridLoggerProxy
> >
> > Process finished with exit code 0
> >
> >
> > On Fri, Sep 1, 2017 at 2:30 PM, Valentin Kulichenko <
> > valentin.kuliche...@gmail.com> wrote:
> >
> > > Prachi,
> > >
> > > It looks like you're running in quiet mode. Did you try to set
> > > -DIGNITE_QUIET=false
> > > system property?
> > >
> > > -Val
> > >
> > > On Fri, Sep 1, 2017 at 10:43 AM, Prachi Garg 
> wrote:
> > >
> > > > Nikolai,
> > > >
> > > > I have specified 'gridlogger' property in 'IgniteConfiguration', but
> > > looks
> > > > like it does not get instantiated.
> > > >
> > > >  > > > class="org.apache.ignite.configuration.IgniteConfiguration">
> > > >
> > > > 
> > > > 
> > > > 
> > > > 
> > > >  > > > value="/Users/prachig/myexamples/config/ignite-log4j.xml"/>
> > > > 
> > > > 
> > > > 
> > > > 
> > > >
> > > > 
> > > > ...
> > > >
> > > > 
> > > >
> > > >
> > > >
> > > >
> > > > On Fri, Sep 1, 2017 at 10:16 AM, Nikolay Tikhonov <
> > > ntikho...@gridgain.com>
> > > > wrote:
> > > >
> > > > > Hi Denis,
> > > > >
> > > > > JCL it's wrapper for logging system (similar sl4j) which can be
> used
> > > > > together with log4j. I guess that JavaDoc correct.
> > > > >
> > > > > On Fri, Sep 1, 2017 at 5:40 PM, Denis Magda 
> > wrote:
> > > > >
> > > > > > Nikolai,
> > > > > >
> > > > > > Looking at JCL documentation I see the usage of Log4j together
> with
> > > > JCL:
> > > > > >
> > > > > > * 
> > > > > > *  ...
> > > > > > *  property name="gridLogger"
> > > > > > *  bean class="org.apache.ignite.
> > > logger.jcl.JclLogger"
> > > > > > *  constructor-arg type="org.apache.commons.
> > > > > > logging.Log"
> > > > > > *  bean class="org.apache.commons.
> > > > > > logging.impl.Log4JLogger"
> > > > > > *  constructor-arg
> type="java.lang.String"
> > > > > > value="config/ignite-log4j.xml"/
> > > > > > *  /bean
> > > > > > *  /constructor-arg
> > > > > > *  /bean
> > > > > > *  /property
> > > > > > *  ...
> > > > > > * 
> > > > > >
> > > > > >
> > > > > > or
> > > > > >
> > > > > > * And the same configuration if you'd like to configure Ignite in
> > > your
> > > > > > code:
> > > > > > * 
> > > > > > *  IgniteConfiguration cfg = new IgniteConfiguration();
> > > > > > *  ...
> > > > > > *  IgniteLogger log = new JclLogger(new
> > > Log4JLogger("config/ignite-
> > > > > > log4j.xml"));
> > > > > > *  ...
> > > > > > *  cfg.setGridLogger(log);
> > > > > > * 
> > > > > >
> > > > > >
> > > > > > Is it wrong? Could you fix the Java Doc in a proper way?
> > > > > >
> > > > > >
> > > > > > > On Sep 1, 2017, at 3:12 AM, Nikolai Tikhonov <
> > ntikho...@apache.org
> > > >
> > > > > > wrote:
> > > > > > >
> > > > > > > Hello Prachi!
> > > > > > >
> > > > > > > You need to set gridLogger property in IgniteConfiguration and
> > > remove
> > > > > > ignite-log4j dependency from POM file.
> > > > > > >
> > > > > > > For example for Sl4j logger:
> > > > > > >
> > > > > > > igniteConfiguration.setGridLogger(new Slf4jLogger());
> > > > > > >
> > > > > > > and for Jc logger:
> > > > > > >
> > > > > > > igniteConfiguration.setGridLogger(new JclLogger());
> > > > > > >
> > > > > > > On Fri, Sep 1, 2017 at 2:44 AM, Prachi Garg <
> pg...@gridgain.com
> > > > >  > > > > > pg...@gridgain.com>> wrote:
> > > > > > > Engineers,
> > > > > > >
> > > > > > > In the attempt to document loggers supported by Ignite, I am
> > > having a
> > > > > > hard
> > > > > > > time configuring ignite-jcl and ignite-slf4j (I could configure
> > > log4j
> > > > > and
> > > > > > > log4j2). I don't see the log message on my console when I use
> > > > > ignite-jcl
> > > > > > or
> > > > > > > ignite-slf4j.
> > > > > > >
> > > > > > >  Below is the 

Re: How to configure ignite-jcl and Ignite-slf4j logger

2017-09-01 Thread Prachi Garg
Yes, I tried using it, but strangely this is the output I get when use
-DIGNITE_QUIET=false
( I set this property in Idea ->Run -> Edit Configurations -> VM options)

log4j:WARN No appenders could be found for logger
(org.apache.ignite.internal.util.typedef.G).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
more info.
Sep 01, 2017 2:33:07 PM java.util.logging.LogManager$RootLogger log
SEVERE: Failed to resolve default logging config file:
config/java.util.logging.properties
class org.apache.ignite.internal.GridLoggerProxy

Process finished with exit code 0


On Fri, Sep 1, 2017 at 2:30 PM, Valentin Kulichenko <
valentin.kuliche...@gmail.com> wrote:

> Prachi,
>
> It looks like you're running in quiet mode. Did you try to set
> -DIGNITE_QUIET=false
> system property?
>
> -Val
>
> On Fri, Sep 1, 2017 at 10:43 AM, Prachi Garg  wrote:
>
> > Nikolai,
> >
> > I have specified 'gridlogger' property in 'IgniteConfiguration', but
> looks
> > like it does not get instantiated.
> >
> >  > class="org.apache.ignite.configuration.IgniteConfiguration">
> >
> > 
> > 
> > 
> > 
> >  > value="/Users/prachig/myexamples/config/ignite-log4j.xml"/>
> > 
> > 
> > 
> > 
> >
> > 
> > ...
> >
> > 
> >
> >
> >
> >
> > On Fri, Sep 1, 2017 at 10:16 AM, Nikolay Tikhonov <
> ntikho...@gridgain.com>
> > wrote:
> >
> > > Hi Denis,
> > >
> > > JCL it's wrapper for logging system (similar sl4j) which can be used
> > > together with log4j. I guess that JavaDoc correct.
> > >
> > > On Fri, Sep 1, 2017 at 5:40 PM, Denis Magda  wrote:
> > >
> > > > Nikolai,
> > > >
> > > > Looking at JCL documentation I see the usage of Log4j together with
> > JCL:
> > > >
> > > > * 
> > > > *  ...
> > > > *  property name="gridLogger"
> > > > *  bean class="org.apache.ignite.
> logger.jcl.JclLogger"
> > > > *  constructor-arg type="org.apache.commons.
> > > > logging.Log"
> > > > *  bean class="org.apache.commons.
> > > > logging.impl.Log4JLogger"
> > > > *  constructor-arg type="java.lang.String"
> > > > value="config/ignite-log4j.xml"/
> > > > *  /bean
> > > > *  /constructor-arg
> > > > *  /bean
> > > > *  /property
> > > > *  ...
> > > > * 
> > > >
> > > >
> > > > or
> > > >
> > > > * And the same configuration if you'd like to configure Ignite in
> your
> > > > code:
> > > > * 
> > > > *  IgniteConfiguration cfg = new IgniteConfiguration();
> > > > *  ...
> > > > *  IgniteLogger log = new JclLogger(new
> Log4JLogger("config/ignite-
> > > > log4j.xml"));
> > > > *  ...
> > > > *  cfg.setGridLogger(log);
> > > > * 
> > > >
> > > >
> > > > Is it wrong? Could you fix the Java Doc in a proper way?
> > > >
> > > >
> > > > > On Sep 1, 2017, at 3:12 AM, Nikolai Tikhonov  >
> > > > wrote:
> > > > >
> > > > > Hello Prachi!
> > > > >
> > > > > You need to set gridLogger property in IgniteConfiguration and
> remove
> > > > ignite-log4j dependency from POM file.
> > > > >
> > > > > For example for Sl4j logger:
> > > > >
> > > > > igniteConfiguration.setGridLogger(new Slf4jLogger());
> > > > >
> > > > > and for Jc logger:
> > > > >
> > > > > igniteConfiguration.setGridLogger(new JclLogger());
> > > > >
> > > > > On Fri, Sep 1, 2017 at 2:44 AM, Prachi Garg  > >  > > > pg...@gridgain.com>> wrote:
> > > > > Engineers,
> > > > >
> > > > > In the attempt to document loggers supported by Ignite, I am
> having a
> > > > hard
> > > > > time configuring ignite-jcl and ignite-slf4j (I could configure
> log4j
> > > and
> > > > > log4j2). I don't see the log message on my console when I use
> > > ignite-jcl
> > > > or
> > > > > ignite-slf4j.
> > > > >
> > > > >  Below is the configuration and sample code I am using:
> > > > >
> > > > > *ignite-log4j.xml*
> > > > >
> > > > > 
> > > > >  > > > > xmlns:log4j='http://jakarta.apache.org/log4j/ <
> > > > http://jakarta.apache.org/log4j/>'>
> > > > >
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >
> > > > > 
> > > > >
> > > > >
> > > > > *Maven dependency -*
> > > > >
> > > > > 
> > > > > org.apache.ignite
> > > > > ignite-log4j
> > > > > 2.1.0
> > > > > 
> > > > >
> > > > > 
> > > > > org.apache.ignite
> > > > > ignite-jcl
> > > > > 2.1.0
> > > > > 
> > > > >
> > > > >
> > > > > *Configuration for JCL ( as specified in javadoc)- *
> > > > >
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >  > > > > value="/Users/prachig/myexamples/config/ignite-log4j.xml"/>
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > 

Re: How to configure ignite-jcl and Ignite-slf4j logger

2017-09-01 Thread Valentin Kulichenko
Prachi,

It looks like you're running in quiet mode. Did you try to set
-DIGNITE_QUIET=false
system property?

-Val

On Fri, Sep 1, 2017 at 10:43 AM, Prachi Garg  wrote:

> Nikolai,
>
> I have specified 'gridlogger' property in 'IgniteConfiguration', but looks
> like it does not get instantiated.
>
>  class="org.apache.ignite.configuration.IgniteConfiguration">
>
> 
> 
> 
> 
>  value="/Users/prachig/myexamples/config/ignite-log4j.xml"/>
> 
> 
> 
> 
>
> 
> ...
>
> 
>
>
>
>
> On Fri, Sep 1, 2017 at 10:16 AM, Nikolay Tikhonov 
> wrote:
>
> > Hi Denis,
> >
> > JCL it's wrapper for logging system (similar sl4j) which can be used
> > together with log4j. I guess that JavaDoc correct.
> >
> > On Fri, Sep 1, 2017 at 5:40 PM, Denis Magda  wrote:
> >
> > > Nikolai,
> > >
> > > Looking at JCL documentation I see the usage of Log4j together with
> JCL:
> > >
> > > * 
> > > *  ...
> > > *  property name="gridLogger"
> > > *  bean class="org.apache.ignite.logger.jcl.JclLogger"
> > > *  constructor-arg type="org.apache.commons.
> > > logging.Log"
> > > *  bean class="org.apache.commons.
> > > logging.impl.Log4JLogger"
> > > *  constructor-arg type="java.lang.String"
> > > value="config/ignite-log4j.xml"/
> > > *  /bean
> > > *  /constructor-arg
> > > *  /bean
> > > *  /property
> > > *  ...
> > > * 
> > >
> > >
> > > or
> > >
> > > * And the same configuration if you'd like to configure Ignite in your
> > > code:
> > > * 
> > > *  IgniteConfiguration cfg = new IgniteConfiguration();
> > > *  ...
> > > *  IgniteLogger log = new JclLogger(new Log4JLogger("config/ignite-
> > > log4j.xml"));
> > > *  ...
> > > *  cfg.setGridLogger(log);
> > > * 
> > >
> > >
> > > Is it wrong? Could you fix the Java Doc in a proper way?
> > >
> > >
> > > > On Sep 1, 2017, at 3:12 AM, Nikolai Tikhonov 
> > > wrote:
> > > >
> > > > Hello Prachi!
> > > >
> > > > You need to set gridLogger property in IgniteConfiguration and remove
> > > ignite-log4j dependency from POM file.
> > > >
> > > > For example for Sl4j logger:
> > > >
> > > > igniteConfiguration.setGridLogger(new Slf4jLogger());
> > > >
> > > > and for Jc logger:
> > > >
> > > > igniteConfiguration.setGridLogger(new JclLogger());
> > > >
> > > > On Fri, Sep 1, 2017 at 2:44 AM, Prachi Garg  >  > > pg...@gridgain.com>> wrote:
> > > > Engineers,
> > > >
> > > > In the attempt to document loggers supported by Ignite, I am having a
> > > hard
> > > > time configuring ignite-jcl and ignite-slf4j (I could configure log4j
> > and
> > > > log4j2). I don't see the log message on my console when I use
> > ignite-jcl
> > > or
> > > > ignite-slf4j.
> > > >
> > > >  Below is the configuration and sample code I am using:
> > > >
> > > > *ignite-log4j.xml*
> > > >
> > > > 
> > > >  > > > xmlns:log4j='http://jakarta.apache.org/log4j/ <
> > > http://jakarta.apache.org/log4j/>'>
> > > >
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > >
> > > > 
> > > > 
> > > > 
> > > > 
> > > >
> > > > 
> > > >
> > > >
> > > > *Maven dependency -*
> > > >
> > > > 
> > > > org.apache.ignite
> > > > ignite-log4j
> > > > 2.1.0
> > > > 
> > > >
> > > > 
> > > > org.apache.ignite
> > > > ignite-jcl
> > > > 2.1.0
> > > > 
> > > >
> > > >
> > > > *Configuration for JCL ( as specified in javadoc)- *
> > > >
> > > > 
> > > > 
> > > > 
> > > > 
> > > >  > > > value="/Users/prachig/myexamples/config/ignite-log4j.xml"/>
> > > > 
> > > > 
> > > > 
> > > > 
> > > >
> > > >
> > > > *Sample code I am using- *
> > > >
> > > > public class LoggerExample {
> > > > public static void main(String[] args) throws IgniteException {
> > > > try (Ignite ignite =
> > > > Ignition.start("/Users/prachig/myexamples/config/
> cluster-config.xml"))
> > > > {
> > > > ignite.log().info("Info Message 1 Logged !!!");
> > > > ignite.log().info("Info Message 2 Logged !!!");
> > > >
> > > > System.out.println(ignite.log().getClass());
> > > > }
> > > > }
> > > > }
> > > >
> > > > *Output*
> > > >
> > > > /Library/Java/JavaVirtualMachines/jdk1.8.0_
> > 74.jdk/Contents/Home/bin/java
> > > > -Didea.launcher.port=7535
> > > > "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA
> > > > CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath
> > > > "/Library/Java/JavaVirtualMachines/jdk1.8.0_
> > > 74.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/
> > > JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/
> > > deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_
> > > 

Re: How to configure ignite-jcl and Ignite-slf4j logger

2017-09-01 Thread Prachi Garg
Nikolai,

I have specified 'gridlogger' property in 'IgniteConfiguration', but looks
like it does not get instantiated.














...






On Fri, Sep 1, 2017 at 10:16 AM, Nikolay Tikhonov 
wrote:

> Hi Denis,
>
> JCL it's wrapper for logging system (similar sl4j) which can be used
> together with log4j. I guess that JavaDoc correct.
>
> On Fri, Sep 1, 2017 at 5:40 PM, Denis Magda  wrote:
>
> > Nikolai,
> >
> > Looking at JCL documentation I see the usage of Log4j together with JCL:
> >
> > * 
> > *  ...
> > *  property name="gridLogger"
> > *  bean class="org.apache.ignite.logger.jcl.JclLogger"
> > *  constructor-arg type="org.apache.commons.
> > logging.Log"
> > *  bean class="org.apache.commons.
> > logging.impl.Log4JLogger"
> > *  constructor-arg type="java.lang.String"
> > value="config/ignite-log4j.xml"/
> > *  /bean
> > *  /constructor-arg
> > *  /bean
> > *  /property
> > *  ...
> > * 
> >
> >
> > or
> >
> > * And the same configuration if you'd like to configure Ignite in your
> > code:
> > * 
> > *  IgniteConfiguration cfg = new IgniteConfiguration();
> > *  ...
> > *  IgniteLogger log = new JclLogger(new Log4JLogger("config/ignite-
> > log4j.xml"));
> > *  ...
> > *  cfg.setGridLogger(log);
> > * 
> >
> >
> > Is it wrong? Could you fix the Java Doc in a proper way?
> >
> >
> > > On Sep 1, 2017, at 3:12 AM, Nikolai Tikhonov 
> > wrote:
> > >
> > > Hello Prachi!
> > >
> > > You need to set gridLogger property in IgniteConfiguration and remove
> > ignite-log4j dependency from POM file.
> > >
> > > For example for Sl4j logger:
> > >
> > > igniteConfiguration.setGridLogger(new Slf4jLogger());
> > >
> > > and for Jc logger:
> > >
> > > igniteConfiguration.setGridLogger(new JclLogger());
> > >
> > > On Fri, Sep 1, 2017 at 2:44 AM, Prachi Garg   > pg...@gridgain.com>> wrote:
> > > Engineers,
> > >
> > > In the attempt to document loggers supported by Ignite, I am having a
> > hard
> > > time configuring ignite-jcl and ignite-slf4j (I could configure log4j
> and
> > > log4j2). I don't see the log message on my console when I use
> ignite-jcl
> > or
> > > ignite-slf4j.
> > >
> > >  Below is the configuration and sample code I am using:
> > >
> > > *ignite-log4j.xml*
> > >
> > > 
> > >  > > xmlns:log4j='http://jakarta.apache.org/log4j/ <
> > http://jakarta.apache.org/log4j/>'>
> > >
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> > > 
> > > 
> > > 
> > > 
> > >
> > > 
> > >
> > >
> > > *Maven dependency -*
> > >
> > > 
> > > org.apache.ignite
> > > ignite-log4j
> > > 2.1.0
> > > 
> > >
> > > 
> > > org.apache.ignite
> > > ignite-jcl
> > > 2.1.0
> > > 
> > >
> > >
> > > *Configuration for JCL ( as specified in javadoc)- *
> > >
> > > 
> > > 
> > > 
> > > 
> > >  > > value="/Users/prachig/myexamples/config/ignite-log4j.xml"/>
> > > 
> > > 
> > > 
> > > 
> > >
> > >
> > > *Sample code I am using- *
> > >
> > > public class LoggerExample {
> > > public static void main(String[] args) throws IgniteException {
> > > try (Ignite ignite =
> > > Ignition.start("/Users/prachig/myexamples/config/cluster-config.xml"))
> > > {
> > > ignite.log().info("Info Message 1 Logged !!!");
> > > ignite.log().info("Info Message 2 Logged !!!");
> > >
> > > System.out.println(ignite.log().getClass());
> > > }
> > > }
> > > }
> > >
> > > *Output*
> > >
> > > /Library/Java/JavaVirtualMachines/jdk1.8.0_
> 74.jdk/Contents/Home/bin/java
> > > -Didea.launcher.port=7535
> > > "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA
> > > CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath
> > > "/Library/Java/JavaVirtualMachines/jdk1.8.0_
> > 74.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/
> > JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/
> > deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_
> > 74.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/
> > Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/
> > lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.
> > 8.0_74.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/
> > Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/
> > lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.
> > 8.0_74.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/
> > JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/
> > ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_
> > 74.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/
> > JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/
> 

Re: How to configure ignite-jcl and Ignite-slf4j logger

2017-09-01 Thread Nikolay Tikhonov
Hi Denis,

JCL it's wrapper for logging system (similar sl4j) which can be used
together with log4j. I guess that JavaDoc correct.

On Fri, Sep 1, 2017 at 5:40 PM, Denis Magda  wrote:

> Nikolai,
>
> Looking at JCL documentation I see the usage of Log4j together with JCL:
>
> * 
> *  ...
> *  property name="gridLogger"
> *  bean class="org.apache.ignite.logger.jcl.JclLogger"
> *  constructor-arg type="org.apache.commons.
> logging.Log"
> *  bean class="org.apache.commons.
> logging.impl.Log4JLogger"
> *  constructor-arg type="java.lang.String"
> value="config/ignite-log4j.xml"/
> *  /bean
> *  /constructor-arg
> *  /bean
> *  /property
> *  ...
> * 
>
>
> or
>
> * And the same configuration if you'd like to configure Ignite in your
> code:
> * 
> *  IgniteConfiguration cfg = new IgniteConfiguration();
> *  ...
> *  IgniteLogger log = new JclLogger(new Log4JLogger("config/ignite-
> log4j.xml"));
> *  ...
> *  cfg.setGridLogger(log);
> * 
>
>
> Is it wrong? Could you fix the Java Doc in a proper way?
>
>
> > On Sep 1, 2017, at 3:12 AM, Nikolai Tikhonov 
> wrote:
> >
> > Hello Prachi!
> >
> > You need to set gridLogger property in IgniteConfiguration and remove
> ignite-log4j dependency from POM file.
> >
> > For example for Sl4j logger:
> >
> > igniteConfiguration.setGridLogger(new Slf4jLogger());
> >
> > and for Jc logger:
> >
> > igniteConfiguration.setGridLogger(new JclLogger());
> >
> > On Fri, Sep 1, 2017 at 2:44 AM, Prachi Garg > wrote:
> > Engineers,
> >
> > In the attempt to document loggers supported by Ignite, I am having a
> hard
> > time configuring ignite-jcl and ignite-slf4j (I could configure log4j and
> > log4j2). I don't see the log message on my console when I use ignite-jcl
> or
> > ignite-slf4j.
> >
> >  Below is the configuration and sample code I am using:
> >
> > *ignite-log4j.xml*
> >
> > 
> >  > xmlns:log4j='http://jakarta.apache.org/log4j/ <
> http://jakarta.apache.org/log4j/>'>
> >
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > 
> > 
> > 
> > 
> >
> > 
> >
> >
> > *Maven dependency -*
> >
> > 
> > org.apache.ignite
> > ignite-log4j
> > 2.1.0
> > 
> >
> > 
> > org.apache.ignite
> > ignite-jcl
> > 2.1.0
> > 
> >
> >
> > *Configuration for JCL ( as specified in javadoc)- *
> >
> > 
> > 
> > 
> > 
> >  > value="/Users/prachig/myexamples/config/ignite-log4j.xml"/>
> > 
> > 
> > 
> > 
> >
> >
> > *Sample code I am using- *
> >
> > public class LoggerExample {
> > public static void main(String[] args) throws IgniteException {
> > try (Ignite ignite =
> > Ignition.start("/Users/prachig/myexamples/config/cluster-config.xml"))
> > {
> > ignite.log().info("Info Message 1 Logged !!!");
> > ignite.log().info("Info Message 2 Logged !!!");
> >
> > System.out.println(ignite.log().getClass());
> > }
> > }
> > }
> >
> > *Output*
> >
> > /Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/bin/java
> > -Didea.launcher.port=7535
> > "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA
> > CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath
> > "/Library/Java/JavaVirtualMachines/jdk1.8.0_
> 74.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/
> JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/
> deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_
> 74.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/
> Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/
> lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.
> 8.0_74.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/
> Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/
> lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.
> 8.0_74.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/
> JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/
> ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_
> 74.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/
> JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/
> ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_
> 74.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/
> Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/
> lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.
> 8.0_74.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/
> JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/
> jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_
> 74.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/
> JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/
> jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_
> 74.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/
> 

Re: How to configure ignite-jcl and Ignite-slf4j logger

2017-09-01 Thread Denis Magda
Nikolai,

Looking at JCL documentation I see the usage of Log4j together with JCL:

* 
*  ...
*  property name="gridLogger"
*  bean class="org.apache.ignite.logger.jcl.JclLogger"
*  constructor-arg type="org.apache.commons.logging.Log"
*  bean 
class="org.apache.commons.logging.impl.Log4JLogger"
*  constructor-arg type="java.lang.String" 
value="config/ignite-log4j.xml"/
*  /bean
*  /constructor-arg
*  /bean
*  /property
*  ...
* 


or

* And the same configuration if you'd like to configure Ignite in your code:
* 
*  IgniteConfiguration cfg = new IgniteConfiguration();
*  ...
*  IgniteLogger log = new JclLogger(new 
Log4JLogger("config/ignite-log4j.xml"));
*  ...
*  cfg.setGridLogger(log);
* 


Is it wrong? Could you fix the Java Doc in a proper way?


> On Sep 1, 2017, at 3:12 AM, Nikolai Tikhonov  wrote:
> 
> Hello Prachi!
> 
> You need to set gridLogger property in IgniteConfiguration and remove 
> ignite-log4j dependency from POM file.
> 
> For example for Sl4j logger:
> 
> igniteConfiguration.setGridLogger(new Slf4jLogger());
> 
> and for Jc logger:
> 
> igniteConfiguration.setGridLogger(new JclLogger());
> 
> On Fri, Sep 1, 2017 at 2:44 AM, Prachi Garg  > wrote:
> Engineers,
> 
> In the attempt to document loggers supported by Ignite, I am having a hard
> time configuring ignite-jcl and ignite-slf4j (I could configure log4j and
> log4j2). I don't see the log message on my console when I use ignite-jcl or
> ignite-slf4j.
> 
>  Below is the configuration and sample code I am using:
> 
> *ignite-log4j.xml*
> 
> 
>  xmlns:log4j='http://jakarta.apache.org/log4j/ 
> '>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> *Maven dependency -*
> 
> 
> org.apache.ignite
> ignite-log4j
> 2.1.0
> 
> 
> 
> org.apache.ignite
> ignite-jcl
> 2.1.0
> 
> 
> 
> *Configuration for JCL ( as specified in javadoc)- *
> 
> 
> 
> 
> 
>  value="/Users/prachig/myexamples/config/ignite-log4j.xml"/>
> 
> 
> 
> 
> 
> 
> *Sample code I am using- *
> 
> public class LoggerExample {
> public static void main(String[] args) throws IgniteException {
> try (Ignite ignite =
> Ignition.start("/Users/prachig/myexamples/config/cluster-config.xml"))
> {
> ignite.log().info("Info Message 1 Logged !!!");
> ignite.log().info("Info Message 2 Logged !!!");
> 
> System.out.println(ignite.log().getClass());
> }
> }
> }
> 
> *Output*
> 
> /Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/bin/java
> -Didea.launcher.port=7535
> "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA
> CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath
> 

Re: How to configure ignite-jcl and Ignite-slf4j logger

2017-09-01 Thread Nikolai Tikhonov
Hello Prachi!

You need to set gridLogger property in IgniteConfiguration and remove
ignite-log4j dependency from POM file.

For example for Sl4j logger:

*igniteConfiguration.setGridLogger(new Slf4jLogger());*

and for Jc logger:

*igniteConfiguration.setGridLogger(new JclLogger());*

On Fri, Sep 1, 2017 at 2:44 AM, Prachi Garg  wrote:

> Engineers,
>
> In the attempt to document loggers supported by Ignite, I am having a hard
> time configuring ignite-jcl and ignite-slf4j (I could configure log4j and
> log4j2). I don't see the log message on my console when I use ignite-jcl or
> ignite-slf4j.
>
>  Below is the configuration and sample code I am using:
>
> *ignite-log4j.xml*
>
> 
>  xmlns:log4j='http://jakarta.apache.org/log4j/'>
>
> 
> 
> 
> 
> 
> 
>
> 
> 
> 
> 
>
> 
>
>
> *Maven dependency -*
>
> 
> org.apache.ignite
> ignite-log4j
> 2.1.0
> 
>
> 
> org.apache.ignite
> ignite-jcl
> 2.1.0
> 
>
>
> *Configuration for JCL ( as specified in javadoc)- *
>
> 
> 
> 
> 
>  value="/Users/prachig/myexamples/config/ignite-log4j.xml"/>
> 
> 
> 
> 
>
>
> *Sample code I am using- *
>
> public class LoggerExample {
> public static void main(String[] args) throws IgniteException {
> try (Ignite ignite =
> Ignition.start("/Users/prachig/myexamples/config/cluster-config.xml"))
> {
> ignite.log().info("Info Message 1 Logged !!!");
> ignite.log().info("Info Message 2 Logged !!!");
>
> System.out.println(ignite.log().getClass());
> }
> }
> }
>
> *Output*
>
> /Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/bin/java
> -Didea.launcher.port=7535
> "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA
> CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath
> "/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/
> charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_
> 74.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/
> JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/
> ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.
> 8.0_74.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/
> Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/
> lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.
> 8.0_74.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/
> Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/
> lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_
> 74.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/
> JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/
> ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_
> 74.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/
> JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/
> ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.
> 8.0_74.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/
> Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/
> lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_
> 74.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/
> JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/
> jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_
> 74.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/
> JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/
> jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_
> 74.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/
> Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/
> lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_
> 74.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/
> JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/
> rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_
> 74.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/
> JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/lib/dt.
> jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/lib/
> javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_
> 74.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/
> JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/lib/
> packager.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_
> 74.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/
> JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/lib/
> tools.jar:/Users/prachig/myexamples/target/classes:/
> Users/prachig/.m2/repository/org/apache/ignite/ignite-core/
> 2.1.0/ignite-core-2.1.0.jar:/Users/prachig/.m2/repository/
> javax/cache/cache-api/1.0.0/cache-api-1.0.0.jar:/Users/
> prachig/.m2/repository/org/jetbrains/annotations/13.0/
> annotations-13.0.jar:/Users/prachig/.m2/repository/org/
> gridgain/ignite-shmem/1.0.0/ignite-shmem-1.0.0.jar:/Users/
> prachig/.m2/repository/org/apache/ignite/ignite-spring/2.
> 1.0/ignite-spring-2.1.0.jar:/Users/prachig/.m2/repository/
> org/apache/ignite/ignite-indexing/2.1.0/ignite-indexing-2.1.0.jar:/Users/

How to configure ignite-jcl and Ignite-slf4j logger

2017-08-31 Thread Prachi Garg
Engineers,

In the attempt to document loggers supported by Ignite, I am having a hard
time configuring ignite-jcl and ignite-slf4j (I could configure log4j and
log4j2). I don't see the log message on my console when I use ignite-jcl or
ignite-slf4j.

 Below is the configuration and sample code I am using:

*ignite-log4j.xml*



















*Maven dependency -*


org.apache.ignite
ignite-log4j
2.1.0



org.apache.ignite
ignite-jcl
2.1.0



*Configuration for JCL ( as specified in javadoc)- *












*Sample code I am using- *

public class LoggerExample {
public static void main(String[] args) throws IgniteException {
try (Ignite ignite =
Ignition.start("/Users/prachig/myexamples/config/cluster-config.xml"))
{
ignite.log().info("Info Message 1 Logged !!!");
ignite.log().info("Info Message 2 Logged !!!");

System.out.println(ignite.log().getClass());
}
}
}

*Output*

/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/bin/java
-Didea.launcher.port=7535
"-Didea.launcher.bin.path=/Applications/IntelliJ IDEA
CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath