You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Bhavesh Patel <bh...@yahoo.com.INVALID> on 2018/12/20 22:18:38 UTC
Regarding log4j2 monitor interval
Hi, I have a question about monitor interval on log4j2 configuration file. I know that the monitor interval will work if anything is directly updated in the configuration file. Is there a way to track updates made to any lookups referred in the configuration file using monitor interval? Our issue if that we are using a Kafka Appender and have removed the Kafka bootstrap servers and topic names in a separate abc.properties file. From log4j2.xml, we do a bundle lookup to abc and get the value for Kafka bootstrap server and topic names. We have monitor interval set on log4j2.xml but since Kafka bootstrap server and topic names are not in this file, any updated made to them in the abc.properties file will not be picked up by monitor interval unless the application is restarted. Anyone faced this issue or can suggest any solution for this?
Thanks,Bhavesh.
Re: Regarding log4j2 monitor interval
Posted by Bhavesh Patel <bh...@yahoo.com.INVALID>.
Created a JIRA issue (https://issues.apache.org/jira/browse/LOG4J2-2526). I have put in the basic information. Please feel free to update it as needed.
Thanks,Bhavesh.
On Friday, December 21, 2018, 8:36:01 AM PST, Ralph Goers <ra...@dslextreme.com> wrote:
If you haven’t created a Jira issue for this please do. I need to make modifications to the current file watching logic as I need to be able to monitor configurations external to the application, such as in Spring cloud or possibly even in a git repo. It may be that we will want to add a list of paths or urls to monitor in the configuration.
Ralph
> On Dec 21, 2018, at 8:49 AM, Matt Sicker <bo...@gmail.com> wrote:
>
> I'm also interested in this idea. My current workaround that I'm using for
> refreshing system properties (for example) is to call
> LoggerContext.getContext(false).reconfigure() after updating lookup values.
> I'd imagine we'd need a new API to support the configuration being notified
> of lookup value changes to avoid this, though.
>
> On Thu, 20 Dec 2018 at 16:18, Bhavesh Patel <bh...@yahoo.com.invalid>
> wrote:
>
>> Hi, I have a question about monitor interval on log4j2 configuration
>> file. I know that the monitor interval will work if anything is directly
>> updated in the configuration file. Is there a way to track updates made to
>> any lookups referred in the configuration file using monitor interval?
>> Our issue if that we are using a Kafka Appender and have removed the Kafka
>> bootstrap servers and topic names in a separate abc.properties file. From
>> log4j2.xml, we do a bundle lookup to abc and get the value for Kafka
>> bootstrap server and topic names. We have monitor interval set on
>> log4j2.xml but since Kafka bootstrap server and topic names are not in this
>> file, any updated made to them in the abc.properties file will not be
>> picked up by monitor interval unless the application is restarted.
>> Anyone faced this issue or can suggest any solution for this?
>> Thanks,Bhavesh.
>
>
>
> --
> Matt Sicker <bo...@gmail.com>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Regarding log4j2 monitor interval
Posted by Ralph Goers <ra...@dslextreme.com>.
If you haven’t created a Jira issue for this please do. I need to make modifications to the current file watching logic as I need to be able to monitor configurations external to the application, such as in Spring cloud or possibly even in a git repo. It may be that we will want to add a list of paths or urls to monitor in the configuration.
Ralph
> On Dec 21, 2018, at 8:49 AM, Matt Sicker <bo...@gmail.com> wrote:
>
> I'm also interested in this idea. My current workaround that I'm using for
> refreshing system properties (for example) is to call
> LoggerContext.getContext(false).reconfigure() after updating lookup values.
> I'd imagine we'd need a new API to support the configuration being notified
> of lookup value changes to avoid this, though.
>
> On Thu, 20 Dec 2018 at 16:18, Bhavesh Patel <bh...@yahoo.com.invalid>
> wrote:
>
>> Hi, I have a question about monitor interval on log4j2 configuration
>> file. I know that the monitor interval will work if anything is directly
>> updated in the configuration file. Is there a way to track updates made to
>> any lookups referred in the configuration file using monitor interval?
>> Our issue if that we are using a Kafka Appender and have removed the Kafka
>> bootstrap servers and topic names in a separate abc.properties file. From
>> log4j2.xml, we do a bundle lookup to abc and get the value for Kafka
>> bootstrap server and topic names. We have monitor interval set on
>> log4j2.xml but since Kafka bootstrap server and topic names are not in this
>> file, any updated made to them in the abc.properties file will not be
>> picked up by monitor interval unless the application is restarted.
>> Anyone faced this issue or can suggest any solution for this?
>> Thanks,Bhavesh.
>
>
>
> --
> Matt Sicker <bo...@gmail.com>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Regarding log4j2 monitor interval
Posted by Bhavesh Patel <bh...@yahoo.com>.
Thanks Matt.
Regards,Bhavesh.
On Friday, December 21, 2018, 7:50:44 AM PST, Matt Sicker <bo...@gmail.com> wrote:
I'm also interested in this idea. My current workaround that I'm using for
refreshing system properties (for example) is to call
LoggerContext.getContext(false).reconfigure() after updating lookup values.
I'd imagine we'd need a new API to support the configuration being notified
of lookup value changes to avoid this, though.
On Thu, 20 Dec 2018 at 16:18, Bhavesh Patel <bh...@yahoo.com.invalid>
wrote:
> Hi, I have a question about monitor interval on log4j2 configuration
> file. I know that the monitor interval will work if anything is directly
> updated in the configuration file. Is there a way to track updates made to
> any lookups referred in the configuration file using monitor interval?
> Our issue if that we are using a Kafka Appender and have removed the Kafka
> bootstrap servers and topic names in a separate abc.properties file. From
> log4j2.xml, we do a bundle lookup to abc and get the value for Kafka
> bootstrap server and topic names. We have monitor interval set on
> log4j2.xml but since Kafka bootstrap server and topic names are not in this
> file, any updated made to them in the abc.properties file will not be
> picked up by monitor interval unless the application is restarted.
> Anyone faced this issue or can suggest any solution for this?
> Thanks,Bhavesh.
--
Matt Sicker <bo...@gmail.com>
Re: Regarding log4j2 monitor interval
Posted by Matt Sicker <bo...@gmail.com>.
I'm also interested in this idea. My current workaround that I'm using for
refreshing system properties (for example) is to call
LoggerContext.getContext(false).reconfigure() after updating lookup values.
I'd imagine we'd need a new API to support the configuration being notified
of lookup value changes to avoid this, though.
On Thu, 20 Dec 2018 at 16:18, Bhavesh Patel <bh...@yahoo.com.invalid>
wrote:
> Hi, I have a question about monitor interval on log4j2 configuration
> file. I know that the monitor interval will work if anything is directly
> updated in the configuration file. Is there a way to track updates made to
> any lookups referred in the configuration file using monitor interval?
> Our issue if that we are using a Kafka Appender and have removed the Kafka
> bootstrap servers and topic names in a separate abc.properties file. From
> log4j2.xml, we do a bundle lookup to abc and get the value for Kafka
> bootstrap server and topic names. We have monitor interval set on
> log4j2.xml but since Kafka bootstrap server and topic names are not in this
> file, any updated made to them in the abc.properties file will not be
> picked up by monitor interval unless the application is restarted.
> Anyone faced this issue or can suggest any solution for this?
> Thanks,Bhavesh.
--
Matt Sicker <bo...@gmail.com>