Log4j2 logger not working for jenkins plugin

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Log4j2 logger not working for jenkins plugin

varun vikas
Hi,

I am trying to use Log4j2 for looging in jenkins plugin , as it includes some jar file,
which uses log4j2 for logging.
when I independently run jar, logging is working fine.
But when I include jar in jenkins Plugin, it is not logging any log.
What may be issue, i have also kept log4j2 properties file in resources folder, still not able
to log. can anyOne please help me here?

Thanks,
Varun

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/97b5066e-c2c3-48a4-b316-12152bf390cen%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Log4j2 logger not working for jenkins plugin

Matt Sicker
Are you using the audit-log plugin, too? That specifies a log4j2
config which probably overrides anything you're using.

On Wed, Oct 21, 2020 at 9:04 AM [hidden email]
<[hidden email]> wrote:

>
> Hi,
>
> I am trying to use Log4j2 for looging in jenkins plugin , as it includes some jar file,
> which uses log4j2 for logging.
> when I independently run jar, logging is working fine.
> But when I include jar in jenkins Plugin, it is not logging any log.
> What may be issue, i have also kept log4j2 properties file in resources folder, still not able
> to log. can anyOne please help me here?
>
> Thanks,
> Varun
>
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/97b5066e-c2c3-48a4-b316-12152bf390cen%40googlegroups.com.



--
Matt Sicker
Senior Software Engineer, CloudBees

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAEot4oxiXtyOJ42dL1X3x5S2YyB%2BuFpx7PYkmihmGewu4ohrkw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Log4j2 logger not working for jenkins plugin

varun vikas
Hi Matt,

Thanks for reply.
I am running mvn hpi:run for running jenkins locally. so it includes only jenkins standard plugin. so no audit-log plugin tool , i am using.
It creates log file on local machine but no log is written.
 but It successfully logs on jenkins system log.
I have also included an appender by providing TaskListener.getLogger() printStream as we can add output stream as appender.
to log on jenkins console but it does not work

Thanks,
Varun
On Wednesday, 21 October 2020 at 19:52:23 UTC+5:30 [hidden email] wrote:
Are you using the audit-log plugin, too? That specifies a log4j2
config which probably overrides anything you're using.

On Wed, Oct 21, 2020 at 9:04 AM [hidden email]
<[hidden email]> wrote:

>
> Hi,
>
> I am trying to use Log4j2 for looging in jenkins plugin , as it includes some jar file,
> which uses log4j2 for logging.
> when I independently run jar, logging is working fine.
> But when I include jar in jenkins Plugin, it is not logging any log.
> What may be issue, i have also kept log4j2 properties file in resources folder, still not able
> to log. can anyOne please help me here?
>
> Thanks,
> Varun
>
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/97b5066e-c2c3-48a4-b316-12152bf390cen%40googlegroups.com.



--
Matt Sicker
Senior Software Engineer, CloudBees

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/e67c56db-a8d8-4163-8970-dea7bf1bc59en%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Log4j2 logger not working for jenkins plugin

Matt Sicker
Do you also have log4j-core in your plugin? What other dependencies do you have?

On Wed, Oct 21, 2020 at 9:48 AM [hidden email]
<[hidden email]> wrote:

>
> Hi Matt,
>
> Thanks for reply.
> I am running mvn hpi:run for running jenkins locally. so it includes only jenkins standard plugin. so no audit-log plugin tool , i am using.
> It creates log file on local machine but no log is written.
>  but It successfully logs on jenkins system log.
> I have also included an appender by providing TaskListener.getLogger() printStream as we can add output stream as appender.
> to log on jenkins console but it does not work
>
> Thanks,
> Varun
> On Wednesday, 21 October 2020 at 19:52:23 UTC+5:30 [hidden email] wrote:
>>
>> Are you using the audit-log plugin, too? That specifies a log4j2
>> config which probably overrides anything you're using.
>>
>> On Wed, Oct 21, 2020 at 9:04 AM [hidden email]
>> <[hidden email]> wrote:
>> >
>> > Hi,
>> >
>> > I am trying to use Log4j2 for looging in jenkins plugin , as it includes some jar file,
>> > which uses log4j2 for logging.
>> > when I independently run jar, logging is working fine.
>> > But when I include jar in jenkins Plugin, it is not logging any log.
>> > What may be issue, i have also kept log4j2 properties file in resources folder, still not able
>> > to log. can anyOne please help me here?
>> >
>> > Thanks,
>> > Varun
>> >
>> > --
>> > You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
>> > To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>> > To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/97b5066e-c2c3-48a4-b316-12152bf390cen%40googlegroups.com.
>>
>>
>>
>> --
>> Matt Sicker
>> Senior Software Engineer, CloudBees
>
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/e67c56db-a8d8-4163-8970-dea7bf1bc59en%40googlegroups.com.



--
Matt Sicker
Senior Software Engineer, CloudBees

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAEot4oywr3pZG74T0mWeUn1N1e3wK-VGOCjXwNps1Oq269UdEw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Log4j2 logger not working for jenkins plugin

varun vikas
Hi,

Below are details of maven dependency  which i have included
    <dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.11.0</version>
</dependency>


Thanks,
Varun
On Wednesday, 21 October 2020 at 21:14:49 UTC+5:30 [hidden email] wrote:
Do you also have log4j-core in your plugin? What other dependencies do you have?

On Wed, Oct 21, 2020 at 9:48 AM [hidden email]
<[hidden email]> wrote:

>
> Hi Matt,
>
> Thanks for reply.
> I am running mvn hpi:run for running jenkins locally. so it includes only jenkins standard plugin. so no audit-log plugin tool , i am using.
> It creates log file on local machine but no log is written.
> but It successfully logs on jenkins system log.
> I have also included an appender by providing TaskListener.getLogger() printStream as we can add output stream as appender.
> to log on jenkins console but it does not work
>
> Thanks,
> Varun
> On Wednesday, 21 October 2020 at 19:52:23 UTC+5:30 [hidden email] wrote:
>>
>> Are you using the audit-log plugin, too? That specifies a log4j2
>> config which probably overrides anything you're using.
>>
>> On Wed, Oct 21, 2020 at 9:04 AM [hidden email]
>> <[hidden email]> wrote:
>> >
>> > Hi,
>> >
>> > I am trying to use Log4j2 for looging in jenkins plugin , as it includes some jar file,
>> > which uses log4j2 for logging.
>> > when I independently run jar, logging is working fine.
>> > But when I include jar in jenkins Plugin, it is not logging any log.
>> > What may be issue, i have also kept log4j2 properties file in resources folder, still not able
>> > to log. can anyOne please help me here?
>> >
>> > Thanks,
>> > Varun
>> >
>> > --
>> > You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
>> > To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>> > To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/97b5066e-c2c3-48a4-b316-12152bf390cen%40googlegroups.com.
>>
>>
>>
>> --
>> Matt Sicker
>> Senior Software Engineer, CloudBees
>
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/e67c56db-a8d8-4163-8970-dea7bf1bc59en%40googlegroups.com.



--
Matt Sicker
Senior Software Engineer, CloudBees

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/6c339a39-c2cf-4f7f-9fca-8cad921b494en%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Log4j2 logger not working for jenkins plugin

varun vikas
Hi Matt,
all dependencies are as below:

<dependencies>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.2</version>
</dependency>

<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.6.2</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>job-dsl</artifactId>
<version>1.41</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>structs</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.8.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>3.6</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>1.6.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
<version>1.6.1</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jetbrains/annotations -->
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations-java5</artifactId>
<version>RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.11.0</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.6.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.6.3</version>
</dependency>


</dependencies>
<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories>
</project>

On Wednesday, 21 October 2020 at 21:42:11 UTC+5:30 [hidden email] wrote:
Hi,

Below are details of maven dependency  which i have included
    <dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.11.0</version>
</dependency>


Thanks,
Varun
On Wednesday, 21 October 2020 at 21:14:49 UTC+5:30 [hidden email] wrote:
Do you also have log4j-core in your plugin? What other dependencies do you have?

On Wed, Oct 21, 2020 at 9:48 AM [hidden email]
<[hidden email]> wrote:

>
> Hi Matt,
>
> Thanks for reply.
> I am running mvn hpi:run for running jenkins locally. so it includes only jenkins standard plugin. so no audit-log plugin tool , i am using.
> It creates log file on local machine but no log is written.
> but It successfully logs on jenkins system log.
> I have also included an appender by providing TaskListener.getLogger() printStream as we can add output stream as appender.
> to log on jenkins console but it does not work
>
> Thanks,
> Varun
> On Wednesday, 21 October 2020 at 19:52:23 UTC+5:30 [hidden email] wrote:
>>
>> Are you using the audit-log plugin, too? That specifies a log4j2
>> config which probably overrides anything you're using.
>>
>> On Wed, Oct 21, 2020 at 9:04 AM [hidden email]
>> <[hidden email]> wrote:
>> >
>> > Hi,
>> >
>> > I am trying to use Log4j2 for looging in jenkins plugin , as it includes some jar file,
>> > which uses log4j2 for logging.
>> > when I independently run jar, logging is working fine.
>> > But when I include jar in jenkins Plugin, it is not logging any log.
>> > What may be issue, i have also kept log4j2 properties file in resources folder, still not able
>> > to log. can anyOne please help me here?
>> >
>> > Thanks,
>> > Varun
>> >
>> > --
>> > You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
>> > To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>> > To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/97b5066e-c2c3-48a4-b316-12152bf390cen%40googlegroups.com.
>>
>>
>>
>> --
>> Matt Sicker
>> Senior Software Engineer, CloudBees
>
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/e67c56db-a8d8-4163-8970-dea7bf1bc59en%40googlegroups.com.



--
Matt Sicker
Senior Software Engineer, CloudBees

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/ee21405b-84ff-4920-b03b-c59243f56713n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Log4j2 logger not working for jenkins plugin

Tim Jacomb
Can you post a link to the code? Or at least a new plugin generated off of archetypes where it doesn’t work for you?

Thanks
Tim

On Wed, 21 Oct 2020 at 17:19, [hidden email] <[hidden email]> wrote:
Hi Matt,
all dependencies are as below:

<dependencies>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.2</version>
</dependency>

<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.6.2</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>job-dsl</artifactId>
<version>1.41</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>structs</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.8.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>3.6</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>1.6.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
<version>1.6.1</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jetbrains/annotations -->
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations-java5</artifactId>
<version>RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.11.0</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.6.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.6.3</version>
</dependency>


</dependencies>
<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories>
</project>

On Wednesday, 21 October 2020 at 21:42:11 UTC+5:30 [hidden email] wrote:
Hi,

Below are details of maven dependency  which i have included
    <dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.11.0</version>
</dependency>


Thanks,
Varun
On Wednesday, 21 October 2020 at 21:14:49 UTC+5:30 [hidden email] wrote:
Do you also have log4j-core in your plugin? What other dependencies do you have?

On Wed, Oct 21, 2020 at 9:48 AM [hidden email]
<[hidden email]> wrote:

>
> Hi Matt,
>
> Thanks for reply.
> I am running mvn hpi:run for running jenkins locally. so it includes only jenkins standard plugin. so no audit-log plugin tool , i am using.
> It creates log file on local machine but no log is written.
> but It successfully logs on jenkins system log.
> I have also included an appender by providing TaskListener.getLogger() printStream as we can add output stream as appender.
> to log on jenkins console but it does not work
>
> Thanks,
> Varun
> On Wednesday, 21 October 2020 at 19:52:23 UTC+5:30 [hidden email] wrote:
>>
>> Are you using the audit-log plugin, too? That specifies a log4j2
>> config which probably overrides anything you're using.
>>
>> On Wed, Oct 21, 2020 at 9:04 AM [hidden email]
>> <[hidden email]> wrote:
>> >
>> > Hi,
>> >
>> > I am trying to use Log4j2 for looging in jenkins plugin , as it includes some jar file,
>> > which uses log4j2 for logging.
>> > when I independently run jar, logging is working fine.
>> > But when I include jar in jenkins Plugin, it is not logging any log.
>> > What may be issue, i have also kept log4j2 properties file in resources folder, still not able
>> > to log. can anyOne please help me here?
>> >
>> > Thanks,
>> > Varun
>> >
>> > --
>> > You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
>> > To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>> > To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/97b5066e-c2c3-48a4-b316-12152bf390cen%40googlegroups.com.
>>
>>
>>
>> --
>> Matt Sicker
>> Senior Software Engineer, CloudBees
>
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/e67c56db-a8d8-4163-8970-dea7bf1bc59en%40googlegroups.com.



--
Matt Sicker
Senior Software Engineer, CloudBees

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/ee21405b-84ff-4920-b03b-c59243f56713n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAH-3BidJZh6NrUJYqYuvGd3fa9Tn0c1qt8xAw1AGabSgz4wo5w%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Log4j2 logger not working for jenkins plugin

Matt Sicker
Chances are there's some slf4j dependency interfering. Jenkins uses a
bridge for that into the java.util.logging API from what I've seen.

On Wed, Oct 21, 2020 at 11:39 AM Tim Jacomb <[hidden email]> wrote:

>
> Can you post a link to the code? Or at least a new plugin generated off of archetypes where it doesn’t work for you?
>
> Thanks
> Tim
>
> On Wed, 21 Oct 2020 at 17:19, [hidden email] <[hidden email]> wrote:
>>
>> Hi Matt,
>> all dependencies are as below:
>>
>> <dependencies>
>> <dependency>
>> <groupId>org.apache.httpcomponents</groupId>
>> <artifactId>httpclient</artifactId>
>> <version>4.5.2</version>
>> </dependency>
>>
>> <dependency>
>> <groupId>com.google.code.gson</groupId>
>> <artifactId>gson</artifactId>
>> <version>2.6.2</version>
>> </dependency>
>> <dependency>
>> <groupId>org.jenkins-ci.plugins</groupId>
>> <artifactId>job-dsl</artifactId>
>> <version>1.41</version>
>> <optional>true</optional>
>> </dependency>
>> <dependency>
>> <groupId>org.jenkins-ci.plugins</groupId>
>> <artifactId>structs</artifactId>
>> <version>1.6</version>
>> </dependency>
>> <dependency>
>> <groupId>org.mockito</groupId>
>> <artifactId>mockito-all</artifactId>
>> <version>1.10.19</version>
>> <scope>test</scope>
>> </dependency>
>> <dependency>
>> <groupId>commons-beanutils</groupId>
>> <artifactId>commons-beanutils</artifactId>
>> <version>1.8.3</version>
>> <scope>test</scope>
>> </dependency>
>> <dependency>
>> <groupId>commons-net</groupId>
>> <artifactId>commons-net</artifactId>
>> <version>3.6</version>
>> </dependency>
>> <dependency>
>> <groupId>junit</groupId>
>> <artifactId>junit</artifactId>
>> <scope>test</scope>
>> </dependency>
>> <dependency>
>> <groupId>org.powermock</groupId>
>> <artifactId>powermock-module-junit4</artifactId>
>> <version>1.6.1</version>
>> <scope>test</scope>
>> </dependency>
>> <dependency>
>> <groupId>org.powermock</groupId>
>> <artifactId>powermock-api-mockito</artifactId>
>> <version>1.6.1</version>
>> <scope>test</scope>
>> </dependency>
>> <!-- https://mvnrepository.com/artifact/org.jetbrains/annotations -->
>> <dependency>
>> <groupId>org.jetbrains</groupId>
>> <artifactId>annotations-java5</artifactId>
>> <version>RELEASE</version>
>> <scope>compile</scope>
>> </dependency>
>> <dependency>
>> <groupId>org.apache.logging.log4j</groupId>
>> <artifactId>log4j-api</artifactId>
>> <version>2.11.0</version>
>> </dependency>
>> <dependency>
>> <groupId>org.apache.logging.log4j</groupId>
>> <artifactId>log4j-core</artifactId>
>> <version>2.11.0</version>
>> </dependency>
>> <dependency>
>> <groupId>org.apache.logging.log4j</groupId>
>> <artifactId>log4j-slf4j-impl</artifactId>
>> <version>2.11.0</version>
>> </dependency>
>>
>> <dependency>
>> <groupId>com.fasterxml.jackson.core</groupId>
>> <artifactId>jackson-core</artifactId>
>> <version>2.6.3</version>
>> </dependency>
>> <dependency>
>> <groupId>com.fasterxml.jackson.core</groupId>
>> <artifactId>jackson-databind</artifactId>
>> <version>2.6.3</version>
>> </dependency>
>>
>>
>> </dependencies>
>> <repositories>
>> <repository>
>> <id>repo.jenkins-ci.org</id>
>> <url>https://repo.jenkins-ci.org/public/</url>
>> </repository>
>> </repositories>
>> <pluginRepositories>
>> <pluginRepository>
>> <id>repo.jenkins-ci.org</id>
>> <url>https://repo.jenkins-ci.org/public/</url>
>> </pluginRepository>
>> </pluginRepositories>
>> </project>
>>
>> On Wednesday, 21 October 2020 at 21:42:11 UTC+5:30 [hidden email] wrote:
>>>
>>> Hi,
>>>
>>> Below are details of maven dependency  which i have included
>>>     <dependency>
>>> <groupId>org.apache.logging.log4j</groupId>
>>> <artifactId>log4j-api</artifactId>
>>> <version>2.11.0</version>
>>> </dependency>
>>> <dependency>
>>> <groupId>org.apache.logging.log4j</groupId>
>>> <artifactId>log4j-core</artifactId>
>>> <version>2.11.0</version>
>>> </dependency>
>>> <dependency>
>>> <groupId>org.apache.logging.log4j</groupId>
>>> <artifactId>log4j-slf4j-impl</artifactId>
>>> <version>2.11.0</version>
>>> </dependency>
>>>
>>>
>>> Thanks,
>>> Varun
>>> On Wednesday, 21 October 2020 at 21:14:49 UTC+5:30 [hidden email] wrote:
>>>>
>>>> Do you also have log4j-core in your plugin? What other dependencies do you have?
>>>>
>>>> On Wed, Oct 21, 2020 at 9:48 AM [hidden email]
>>>> <[hidden email]> wrote:
>>>> >
>>>> > Hi Matt,
>>>> >
>>>> > Thanks for reply.
>>>> > I am running mvn hpi:run for running jenkins locally. so it includes only jenkins standard plugin. so no audit-log plugin tool , i am using.
>>>> > It creates log file on local machine but no log is written.
>>>> > but It successfully logs on jenkins system log.
>>>> > I have also included an appender by providing TaskListener.getLogger() printStream as we can add output stream as appender.
>>>> > to log on jenkins console but it does not work
>>>> >
>>>> > Thanks,
>>>> > Varun
>>>> > On Wednesday, 21 October 2020 at 19:52:23 UTC+5:30 [hidden email] wrote:
>>>> >>
>>>> >> Are you using the audit-log plugin, too? That specifies a log4j2
>>>> >> config which probably overrides anything you're using.
>>>> >>
>>>> >> On Wed, Oct 21, 2020 at 9:04 AM [hidden email]
>>>> >> <[hidden email]> wrote:
>>>> >> >
>>>> >> > Hi,
>>>> >> >
>>>> >> > I am trying to use Log4j2 for looging in jenkins plugin , as it includes some jar file,
>>>> >> > which uses log4j2 for logging.
>>>> >> > when I independently run jar, logging is working fine.
>>>> >> > But when I include jar in jenkins Plugin, it is not logging any log.
>>>> >> > What may be issue, i have also kept log4j2 properties file in resources folder, still not able
>>>> >> > to log. can anyOne please help me here?
>>>> >> >
>>>> >> > Thanks,
>>>> >> > Varun
>>>> >> >
>>>> >> > --
>>>> >> > You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
>>>> >> > To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>>>> >> > To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/97b5066e-c2c3-48a4-b316-12152bf390cen%40googlegroups.com.
>>>> >>
>>>> >>
>>>> >>
>>>> >> --
>>>> >> Matt Sicker
>>>> >> Senior Software Engineer, CloudBees
>>>> >
>>>> > --
>>>> > You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
>>>> > To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>>>> > To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/e67c56db-a8d8-4163-8970-dea7bf1bc59en%40googlegroups.com.
>>>>
>>>>
>>>>
>>>> --
>>>> Matt Sicker
>>>> Senior Software Engineer, CloudBees
>>
>> --
>> You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/ee21405b-84ff-4920-b03b-c59243f56713n%40googlegroups.com.
>
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAH-3BidJZh6NrUJYqYuvGd3fa9Tn0c1qt8xAw1AGabSgz4wo5w%40mail.gmail.com.



--
Matt Sicker
Senior Software Engineer, CloudBees

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAEot4ozM2sM%2BkV8WnOQVap%3DFQs5Q7qsvJRrKAj29pyB%3DYmRGoQ%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Log4j2 logger not working for jenkins plugin

varun vikas
Hi,

code is at https://github.com/varun-vikas/Jenkins_plugin 
@matt should I remove sl4j and only use log4j2 and try again?

Thanks,
Varun

On Wednesday, 21 October 2020 at 22:41:48 UTC+5:30 [hidden email] wrote:
Chances are there's some slf4j dependency interfering. Jenkins uses a
bridge for that into the java.util.logging API from what I've seen.

On Wed, Oct 21, 2020 at 11:39 AM Tim Jacomb <[hidden email]> wrote:

>
> Can you post a link to the code? Or at least a new plugin generated off of archetypes where it doesn’t work for you?
>
> Thanks
> Tim
>
> On Wed, 21 Oct 2020 at 17:19, [hidden email] <[hidden email]> wrote:
>>
>> Hi Matt,
>> all dependencies are as below:
>>
>> <dependencies>
>> <dependency>
>> <groupId>org.apache.httpcomponents</groupId>
>> <artifactId>httpclient</artifactId>
>> <version>4.5.2</version>
>> </dependency>
>>
>> <dependency>
>> <groupId>com.google.code.gson</groupId>
>> <artifactId>gson</artifactId>
>> <version>2.6.2</version>
>> </dependency>
>> <dependency>
>> <groupId>org.jenkins-ci.plugins</groupId>
>> <artifactId>job-dsl</artifactId>
>> <version>1.41</version>
>> <optional>true</optional>
>> </dependency>
>> <dependency>
>> <groupId>org.jenkins-ci.plugins</groupId>
>> <artifactId>structs</artifactId>
>> <version>1.6</version>
>> </dependency>
>> <dependency>
>> <groupId>org.mockito</groupId>
>> <artifactId>mockito-all</artifactId>
>> <version>1.10.19</version>
>> <scope>test</scope>
>> </dependency>
>> <dependency>
>> <groupId>commons-beanutils</groupId>
>> <artifactId>commons-beanutils</artifactId>
>> <version>1.8.3</version>
>> <scope>test</scope>
>> </dependency>
>> <dependency>
>> <groupId>commons-net</groupId>
>> <artifactId>commons-net</artifactId>
>> <version>3.6</version>
>> </dependency>
>> <dependency>
>> <groupId>junit</groupId>
>> <artifactId>junit</artifactId>
>> <scope>test</scope>
>> </dependency>
>> <dependency>
>> <groupId>org.powermock</groupId>
>> <artifactId>powermock-module-junit4</artifactId>
>> <version>1.6.1</version>
>> <scope>test</scope>
>> </dependency>
>> <dependency>
>> <groupId>org.powermock</groupId>
>> <artifactId>powermock-api-mockito</artifactId>
>> <version>1.6.1</version>
>> <scope>test</scope>
>> </dependency>
>> <!-- https://mvnrepository.com/artifact/org.jetbrains/annotations -->
>> <dependency>
>> <groupId>org.jetbrains</groupId>
>> <artifactId>annotations-java5</artifactId>
>> <version>RELEASE</version>
>> <scope>compile</scope>
>> </dependency>
>> <dependency>
>> <groupId>org.apache.logging.log4j</groupId>
>> <artifactId>log4j-api</artifactId>
>> <version>2.11.0</version>
>> </dependency>
>> <dependency>
>> <groupId>org.apache.logging.log4j</groupId>
>> <artifactId>log4j-core</artifactId>
>> <version>2.11.0</version>
>> </dependency>
>> <dependency>
>> <groupId>org.apache.logging.log4j</groupId>
>> <artifactId>log4j-slf4j-impl</artifactId>
>> <version>2.11.0</version>
>> </dependency>
>>
>> <dependency>
>> <groupId>com.fasterxml.jackson.core</groupId>
>> <artifactId>jackson-core</artifactId>
>> <version>2.6.3</version>
>> </dependency>
>> <dependency>
>> <groupId>com.fasterxml.jackson.core</groupId>
>> <artifactId>jackson-databind</artifactId>
>> <version>2.6.3</version>
>> </dependency>
>>
>>
>> </dependencies>
>> <repositories>
>> <repository>
>> <id>repo.jenkins-ci.org</id>
>> <url>https://repo.jenkins-ci.org/public/</url>
>> </repository>
>> </repositories>
>> <pluginRepositories>
>> <pluginRepository>
>> <id>repo.jenkins-ci.org</id>
>> <url>https://repo.jenkins-ci.org/public/</url>
>> </pluginRepository>
>> </pluginRepositories>
>> </project>
>>
>> On Wednesday, 21 October 2020 at 21:42:11 UTC+5:30 [hidden email] wrote:
>>>
>>> Hi,
>>>
>>> Below are details of maven dependency which i have included
>>> <dependency>
>>> <groupId>org.apache.logging.log4j</groupId>
>>> <artifactId>log4j-api</artifactId>
>>> <version>2.11.0</version>
>>> </dependency>
>>> <dependency>
>>> <groupId>org.apache.logging.log4j</groupId>
>>> <artifactId>log4j-core</artifactId>
>>> <version>2.11.0</version>
>>> </dependency>
>>> <dependency>
>>> <groupId>org.apache.logging.log4j</groupId>
>>> <artifactId>log4j-slf4j-impl</artifactId>
>>> <version>2.11.0</version>
>>> </dependency>
>>>
>>>
>>> Thanks,
>>> Varun
>>> On Wednesday, 21 October 2020 at 21:14:49 UTC+5:30 [hidden email] wrote:
>>>>
>>>> Do you also have log4j-core in your plugin? What other dependencies do you have?
>>>>
>>>> On Wed, Oct 21, 2020 at 9:48 AM [hidden email]
>>>> <[hidden email]> wrote:
>>>> >
>>>> > Hi Matt,
>>>> >
>>>> > Thanks for reply.
>>>> > I am running mvn hpi:run for running jenkins locally. so it includes only jenkins standard plugin. so no audit-log plugin tool , i am using.
>>>> > It creates log file on local machine but no log is written.
>>>> > but It successfully logs on jenkins system log.
>>>> > I have also included an appender by providing TaskListener.getLogger() printStream as we can add output stream as appender.
>>>> > to log on jenkins console but it does not work
>>>> >
>>>> > Thanks,
>>>> > Varun
>>>> > On Wednesday, 21 October 2020 at 19:52:23 UTC+5:30 [hidden email] wrote:
>>>> >>
>>>> >> Are you using the audit-log plugin, too? That specifies a log4j2
>>>> >> config which probably overrides anything you're using.
>>>> >>
>>>> >> On Wed, Oct 21, 2020 at 9:04 AM [hidden email]
>>>> >> <[hidden email]> wrote:
>>>> >> >
>>>> >> > Hi,
>>>> >> >
>>>> >> > I am trying to use Log4j2 for looging in jenkins plugin , as it includes some jar file,
>>>> >> > which uses log4j2 for logging.
>>>> >> > when I independently run jar, logging is working fine.
>>>> >> > But when I include jar in jenkins Plugin, it is not logging any log.
>>>> >> > What may be issue, i have also kept log4j2 properties file in resources folder, still not able
>>>> >> > to log. can anyOne please help me here?
>>>> >> >
>>>> >> > Thanks,
>>>> >> > Varun
>>>> >> >
>>>> >> > --
>>>> >> > You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
>>>> >> > To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>>>> >> > To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/97b5066e-c2c3-48a4-b316-12152bf390cen%40googlegroups.com.
>>>> >>
>>>> >>
>>>> >>
>>>> >> --
>>>> >> Matt Sicker
>>>> >> Senior Software Engineer, CloudBees
>>>> >
>>>> > --
>>>> > You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
>>>> > To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>>>> > To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/e67c56db-a8d8-4163-8970-dea7bf1bc59en%40googlegroups.com.
>>>>
>>>>
>>>>
>>>> --
>>>> Matt Sicker
>>>> Senior Software Engineer, CloudBees
>>
>> --
>> You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/ee21405b-84ff-4920-b03b-c59243f56713n%40googlegroups.com.
>
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAH-3BidJZh6NrUJYqYuvGd3fa9Tn0c1qt8xAw1AGabSgz4wo5w%40mail.gmail.com.



--
Matt Sicker
Senior Software Engineer, CloudBees

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/b3982d43-1a93-42ef-acfa-c1b7fa1da37an%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Log4j2 logger not working for jenkins plugin

varun vikas
Hi Matt,

Thanks , after removing slf4j, logging starts. 

Thanks,
Varun

On Wednesday, 21 October 2020 at 22:50:31 UTC+5:30 [hidden email] wrote:
Hi,

@matt should I remove sl4j and only use log4j2 and try again?

Thanks,
Varun

On Wednesday, 21 October 2020 at 22:41:48 UTC+5:30 [hidden email] wrote:
Chances are there's some slf4j dependency interfering. Jenkins uses a
bridge for that into the java.util.logging API from what I've seen.

On Wed, Oct 21, 2020 at 11:39 AM Tim Jacomb <[hidden email]> wrote:

>
> Can you post a link to the code? Or at least a new plugin generated off of archetypes where it doesn’t work for you?
>
> Thanks
> Tim
>
> On Wed, 21 Oct 2020 at 17:19, [hidden email] <[hidden email]> wrote:
>>
>> Hi Matt,
>> all dependencies are as below:
>>
>> <dependencies>
>> <dependency>
>> <groupId>org.apache.httpcomponents</groupId>
>> <artifactId>httpclient</artifactId>
>> <version>4.5.2</version>
>> </dependency>
>>
>> <dependency>
>> <groupId>com.google.code.gson</groupId>
>> <artifactId>gson</artifactId>
>> <version>2.6.2</version>
>> </dependency>
>> <dependency>
>> <groupId>org.jenkins-ci.plugins</groupId>
>> <artifactId>job-dsl</artifactId>
>> <version>1.41</version>
>> <optional>true</optional>
>> </dependency>
>> <dependency>
>> <groupId>org.jenkins-ci.plugins</groupId>
>> <artifactId>structs</artifactId>
>> <version>1.6</version>
>> </dependency>
>> <dependency>
>> <groupId>org.mockito</groupId>
>> <artifactId>mockito-all</artifactId>
>> <version>1.10.19</version>
>> <scope>test</scope>
>> </dependency>
>> <dependency>
>> <groupId>commons-beanutils</groupId>
>> <artifactId>commons-beanutils</artifactId>
>> <version>1.8.3</version>
>> <scope>test</scope>
>> </dependency>
>> <dependency>
>> <groupId>commons-net</groupId>
>> <artifactId>commons-net</artifactId>
>> <version>3.6</version>
>> </dependency>
>> <dependency>
>> <groupId>junit</groupId>
>> <artifactId>junit</artifactId>
>> <scope>test</scope>
>> </dependency>
>> <dependency>
>> <groupId>org.powermock</groupId>
>> <artifactId>powermock-module-junit4</artifactId>
>> <version>1.6.1</version>
>> <scope>test</scope>
>> </dependency>
>> <dependency>
>> <groupId>org.powermock</groupId>
>> <artifactId>powermock-api-mockito</artifactId>
>> <version>1.6.1</version>
>> <scope>test</scope>
>> </dependency>
>> <!-- https://mvnrepository.com/artifact/org.jetbrains/annotations -->
>> <dependency>
>> <groupId>org.jetbrains</groupId>
>> <artifactId>annotations-java5</artifactId>
>> <version>RELEASE</version>
>> <scope>compile</scope>
>> </dependency>
>> <dependency>
>> <groupId>org.apache.logging.log4j</groupId>
>> <artifactId>log4j-api</artifactId>
>> <version>2.11.0</version>
>> </dependency>
>> <dependency>
>> <groupId>org.apache.logging.log4j</groupId>
>> <artifactId>log4j-core</artifactId>
>> <version>2.11.0</version>
>> </dependency>
>> <dependency>
>> <groupId>org.apache.logging.log4j</groupId>
>> <artifactId>log4j-slf4j-impl</artifactId>
>> <version>2.11.0</version>
>> </dependency>
>>
>> <dependency>
>> <groupId>com.fasterxml.jackson.core</groupId>
>> <artifactId>jackson-core</artifactId>
>> <version>2.6.3</version>
>> </dependency>
>> <dependency>
>> <groupId>com.fasterxml.jackson.core</groupId>
>> <artifactId>jackson-databind</artifactId>
>> <version>2.6.3</version>
>> </dependency>
>>
>>
>> </dependencies>
>> <repositories>
>> <repository>
>> <id>repo.jenkins-ci.org</id>
>> <url>https://repo.jenkins-ci.org/public/</url>
>> </repository>
>> </repositories>
>> <pluginRepositories>
>> <pluginRepository>
>> <id>repo.jenkins-ci.org</id>
>> <url>https://repo.jenkins-ci.org/public/</url>
>> </pluginRepository>
>> </pluginRepositories>
>> </project>
>>
>> On Wednesday, 21 October 2020 at 21:42:11 UTC+5:30 [hidden email] wrote:
>>>
>>> Hi,
>>>
>>> Below are details of maven dependency which i have included
>>> <dependency>
>>> <groupId>org.apache.logging.log4j</groupId>
>>> <artifactId>log4j-api</artifactId>
>>> <version>2.11.0</version>
>>> </dependency>
>>> <dependency>
>>> <groupId>org.apache.logging.log4j</groupId>
>>> <artifactId>log4j-core</artifactId>
>>> <version>2.11.0</version>
>>> </dependency>
>>> <dependency>
>>> <groupId>org.apache.logging.log4j</groupId>
>>> <artifactId>log4j-slf4j-impl</artifactId>
>>> <version>2.11.0</version>
>>> </dependency>
>>>
>>>
>>> Thanks,
>>> Varun
>>> On Wednesday, 21 October 2020 at 21:14:49 UTC+5:30 [hidden email] wrote:
>>>>
>>>> Do you also have log4j-core in your plugin? What other dependencies do you have?
>>>>
>>>> On Wed, Oct 21, 2020 at 9:48 AM [hidden email]
>>>> <[hidden email]> wrote:
>>>> >
>>>> > Hi Matt,
>>>> >
>>>> > Thanks for reply.
>>>> > I am running mvn hpi:run for running jenkins locally. so it includes only jenkins standard plugin. so no audit-log plugin tool , i am using.
>>>> > It creates log file on local machine but no log is written.
>>>> > but It successfully logs on jenkins system log.
>>>> > I have also included an appender by providing TaskListener.getLogger() printStream as we can add output stream as appender.
>>>> > to log on jenkins console but it does not work
>>>> >
>>>> > Thanks,
>>>> > Varun
>>>> > On Wednesday, 21 October 2020 at 19:52:23 UTC+5:30 [hidden email] wrote:
>>>> >>
>>>> >> Are you using the audit-log plugin, too? That specifies a log4j2
>>>> >> config which probably overrides anything you're using.
>>>> >>
>>>> >> On Wed, Oct 21, 2020 at 9:04 AM [hidden email]
>>>> >> <[hidden email]> wrote:
>>>> >> >
>>>> >> > Hi,
>>>> >> >
>>>> >> > I am trying to use Log4j2 for looging in jenkins plugin , as it includes some jar file,
>>>> >> > which uses log4j2 for logging.
>>>> >> > when I independently run jar, logging is working fine.
>>>> >> > But when I include jar in jenkins Plugin, it is not logging any log.
>>>> >> > What may be issue, i have also kept log4j2 properties file in resources folder, still not able
>>>> >> > to log. can anyOne please help me here?
>>>> >> >
>>>> >> > Thanks,
>>>> >> > Varun
>>>> >> >
>>>> >> > --
>>>> >> > You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
>>>> >> > To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>>>> >> > To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/97b5066e-c2c3-48a4-b316-12152bf390cen%40googlegroups.com.
>>>> >>
>>>> >>
>>>> >>
>>>> >> --
>>>> >> Matt Sicker
>>>> >> Senior Software Engineer, CloudBees
>>>> >
>>>> > --
>>>> > You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
>>>> > To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>>>> > To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/e67c56db-a8d8-4163-8970-dea7bf1bc59en%40googlegroups.com.
>>>>
>>>>
>>>>
>>>> --
>>>> Matt Sicker
>>>> Senior Software Engineer, CloudBees
>>
>> --
>> You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/ee21405b-84ff-4920-b03b-c59243f56713n%40googlegroups.com.
>
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAH-3BidJZh6NrUJYqYuvGd3fa9Tn0c1qt8xAw1AGabSgz4wo5w%40mail.gmail.com.



--
Matt Sicker
Senior Software Engineer, CloudBees

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/efdf888b-a5ed-41ba-934c-38f7d7efed23n%40googlegroups.com.