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 José Danilo Ross Lépiz <jd...@gmail.com> on 2019/02/28 21:59:01 UTC

Remote configuration

Hi

I've been looking for information about support for remote configuration
files without any luck.
Does anyone know if its possible to extend log4j2 to support loading
configuration from sources like S3 or similar?

Thanks.

Re: Remote configuration

Posted by Ralph Goers <ra...@dslextreme.com>.
I am not all that familiar with S3 but a quick glance at the docs tells me it supports either using HTTP or the AWS SDK. The section on event notifications for S3 mentions that it supports object created and object removed events, but I don’t see anything about object modified. It also isn’t clear if the HTTP access support If-Modified-Since. If it does then you could use the enhanced HTTP support I am adding and poll.

In any case, I am completely changing the Watcher interface so it is not specific to files, so it should be easier to add support for things like S3 using their native SDK.

Ralph


> On Mar 1, 2019, at 7:04 AM, José Danilo Ross Lépiz <jd...@gmail.com> wrote:
> 
> Hi Ralph,
> 
> I was thinking something like point any number of log4j instances to a
> single file hosted in S3 and still get the change monitor feature, but then
> it sounds like it would require a custom watchdog that can handle the S3
> connection for checking the file right?
> 
> Thanks
> 
> El jue., 28 feb. 2019 a las 17:24, Ralph Goers (<ra...@dslextreme.com>)
> escribió:
> 
>> If it is just a file URL then there is no problem. You can already access
>> a remote file via http - or any other url natively supported by a
>> URLConnection - but you cannot monitor for changes. I am in the process of
>> adding support for Spring Cloud Config which will allow you to access a
>> file through it that is stored in any of the mechanisms it supports via
>> HTTP and you will be able to monitor changes.
>> 
>> If that doesn’t meet your needs please let me know what you would expect
>> access through S3 would look like.
>> 
>> Ralph
>> 
>>> On Feb 28, 2019, at 2:59 PM, José Danilo Ross Lépiz <
>> jd.ross.17@gmail.com> wrote:
>>> 
>>> Hi
>>> 
>>> I've been looking for information about support for remote configuration
>>> files without any luck.
>>> Does anyone know if its possible to extend log4j2 to support loading
>>> configuration from sources like S3 or similar?
>>> 
>>> Thanks.
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>> 
>> 
> 
> -- 
> José Danilo Ross Lépiz



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Remote configuration

Posted by José Danilo Ross Lépiz <jd...@gmail.com>.
Thanks for all the info, that's what I had in mind a custom watcher using
the AWS SDK. So I'll be looking forward for those new changes you are
working on.

El vie., 1 mar. 2019 a las 9:04, Ralph Goers (<ra...@dslextreme.com>)
escribió:

> I am not sure what one has to do with the other. File retrieval and
> watching is just a mechanism to get to the configuration data. What happens
> with that data is a completely separate issue.
>
> Ralph
>
> > On Mar 1, 2019, at 7:45 AM, Gary Gregory <ga...@gmail.com> wrote:
> >
> > Jumping in... I might author a config plugin that uses Apache Commons VFS
> > and-or Apache Commons Configuration. We first need the ability to nicely
> > plugin such a thing such that the large pile of code we already have for
> > configuration becomes optional and perhaps in a separate module. We still
> > need an SPI for configuration, I am not sure how much of that we have
> now.
> > (AFK ISP down.)
> >
> > Gary
> >
> > On Fri, Mar 1, 2019, 09:04 José Danilo Ross Lépiz <jd.ross.17@gmail.com
> > wrote:
> >
> >> Hi Ralph,
> >>
> >> I was thinking something like point any number of log4j instances to a
> >> single file hosted in S3 and still get the change monitor feature, but
> then
> >> it sounds like it would require a custom watchdog that can handle the S3
> >> connection for checking the file right?
> >>
> >> Thanks
> >>
> >> El jue., 28 feb. 2019 a las 17:24, Ralph Goers (<
> >> ralph.goers@dslextreme.com>)
> >> escribió:
> >>
> >>> If it is just a file URL then there is no problem. You can already
> access
> >>> a remote file via http - or any other url natively supported by a
> >>> URLConnection - but you cannot monitor for changes. I am in the process
> >> of
> >>> adding support for Spring Cloud Config which will allow you to access a
> >>> file through it that is stored in any of the mechanisms it supports via
> >>> HTTP and you will be able to monitor changes.
> >>>
> >>> If that doesn’t meet your needs please let me know what you would
> expect
> >>> access through S3 would look like.
> >>>
> >>> Ralph
> >>>
> >>>> On Feb 28, 2019, at 2:59 PM, José Danilo Ross Lépiz <
> >>> jd.ross.17@gmail.com> wrote:
> >>>>
> >>>> Hi
> >>>>
> >>>> I've been looking for information about support for remote
> >> configuration
> >>>> files without any luck.
> >>>> Does anyone know if its possible to extend log4j2 to support loading
> >>>> configuration from sources like S3 or similar?
> >>>>
> >>>> Thanks.
> >>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> >>> For additional commands, e-mail: log4j-user-help@logging.apache.org
> >>>
> >>>
> >>
> >> --
> >> José Danilo Ross Lépiz
> >>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

-- 
José Danilo Ross Lépiz

Re: Remote configuration

Posted by Ralph Goers <ra...@dslextreme.com>.
I am not sure what one has to do with the other. File retrieval and watching is just a mechanism to get to the configuration data. What happens with that data is a completely separate issue.

Ralph

> On Mar 1, 2019, at 7:45 AM, Gary Gregory <ga...@gmail.com> wrote:
> 
> Jumping in... I might author a config plugin that uses Apache Commons VFS
> and-or Apache Commons Configuration. We first need the ability to nicely
> plugin such a thing such that the large pile of code we already have for
> configuration becomes optional and perhaps in a separate module. We still
> need an SPI for configuration, I am not sure how much of that we have now.
> (AFK ISP down.)
> 
> Gary
> 
> On Fri, Mar 1, 2019, 09:04 José Danilo Ross Lépiz <jd.ross.17@gmail.com
> wrote:
> 
>> Hi Ralph,
>> 
>> I was thinking something like point any number of log4j instances to a
>> single file hosted in S3 and still get the change monitor feature, but then
>> it sounds like it would require a custom watchdog that can handle the S3
>> connection for checking the file right?
>> 
>> Thanks
>> 
>> El jue., 28 feb. 2019 a las 17:24, Ralph Goers (<
>> ralph.goers@dslextreme.com>)
>> escribió:
>> 
>>> If it is just a file URL then there is no problem. You can already access
>>> a remote file via http - or any other url natively supported by a
>>> URLConnection - but you cannot monitor for changes. I am in the process
>> of
>>> adding support for Spring Cloud Config which will allow you to access a
>>> file through it that is stored in any of the mechanisms it supports via
>>> HTTP and you will be able to monitor changes.
>>> 
>>> If that doesn’t meet your needs please let me know what you would expect
>>> access through S3 would look like.
>>> 
>>> Ralph
>>> 
>>>> On Feb 28, 2019, at 2:59 PM, José Danilo Ross Lépiz <
>>> jd.ross.17@gmail.com> wrote:
>>>> 
>>>> Hi
>>>> 
>>>> I've been looking for information about support for remote
>> configuration
>>>> files without any luck.
>>>> Does anyone know if its possible to extend log4j2 to support loading
>>>> configuration from sources like S3 or similar?
>>>> 
>>>> Thanks.
>>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>> 
>>> 
>> 
>> --
>> José Danilo Ross Lépiz
>> 



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Remote configuration

Posted by Gary Gregory <ga...@gmail.com>.
Jumping in... I might author a config plugin that uses Apache Commons VFS
and-or Apache Commons Configuration. We first need the ability to nicely
plugin such a thing such that the large pile of code we already have for
configuration becomes optional and perhaps in a separate module. We still
need an SPI for configuration, I am not sure how much of that we have now.
(AFK ISP down.)

Gary

On Fri, Mar 1, 2019, 09:04 José Danilo Ross Lépiz <jd.ross.17@gmail.com
wrote:

> Hi Ralph,
>
> I was thinking something like point any number of log4j instances to a
> single file hosted in S3 and still get the change monitor feature, but then
> it sounds like it would require a custom watchdog that can handle the S3
> connection for checking the file right?
>
> Thanks
>
> El jue., 28 feb. 2019 a las 17:24, Ralph Goers (<
> ralph.goers@dslextreme.com>)
> escribió:
>
> > If it is just a file URL then there is no problem. You can already access
> > a remote file via http - or any other url natively supported by a
> > URLConnection - but you cannot monitor for changes. I am in the process
> of
> > adding support for Spring Cloud Config which will allow you to access a
> > file through it that is stored in any of the mechanisms it supports via
> > HTTP and you will be able to monitor changes.
> >
> > If that doesn’t meet your needs please let me know what you would expect
> > access through S3 would look like.
> >
> > Ralph
> >
> > > On Feb 28, 2019, at 2:59 PM, José Danilo Ross Lépiz <
> > jd.ross.17@gmail.com> wrote:
> > >
> > > Hi
> > >
> > > I've been looking for information about support for remote
> configuration
> > > files without any luck.
> > > Does anyone know if its possible to extend log4j2 to support loading
> > > configuration from sources like S3 or similar?
> > >
> > > Thanks.
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
> --
> José Danilo Ross Lépiz
>

Re: Remote configuration

Posted by José Danilo Ross Lépiz <jd...@gmail.com>.
Hi Ralph,

I was thinking something like point any number of log4j instances to a
single file hosted in S3 and still get the change monitor feature, but then
it sounds like it would require a custom watchdog that can handle the S3
connection for checking the file right?

Thanks

El jue., 28 feb. 2019 a las 17:24, Ralph Goers (<ra...@dslextreme.com>)
escribió:

> If it is just a file URL then there is no problem. You can already access
> a remote file via http - or any other url natively supported by a
> URLConnection - but you cannot monitor for changes. I am in the process of
> adding support for Spring Cloud Config which will allow you to access a
> file through it that is stored in any of the mechanisms it supports via
> HTTP and you will be able to monitor changes.
>
> If that doesn’t meet your needs please let me know what you would expect
> access through S3 would look like.
>
> Ralph
>
> > On Feb 28, 2019, at 2:59 PM, José Danilo Ross Lépiz <
> jd.ross.17@gmail.com> wrote:
> >
> > Hi
> >
> > I've been looking for information about support for remote configuration
> > files without any luck.
> > Does anyone know if its possible to extend log4j2 to support loading
> > configuration from sources like S3 or similar?
> >
> > Thanks.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

-- 
José Danilo Ross Lépiz

Re: Remote configuration

Posted by Ralph Goers <ra...@dslextreme.com>.
If it is just a file URL then there is no problem. You can already access a remote file via http - or any other url natively supported by a URLConnection - but you cannot monitor for changes. I am in the process of adding support for Spring Cloud Config which will allow you to access a file through it that is stored in any of the mechanisms it supports via HTTP and you will be able to monitor changes.

If that doesn’t meet your needs please let me know what you would expect access through S3 would look like.

Ralph

> On Feb 28, 2019, at 2:59 PM, José Danilo Ross Lépiz <jd...@gmail.com> wrote:
> 
> Hi
> 
> I've been looking for information about support for remote configuration
> files without any luck.
> Does anyone know if its possible to extend log4j2 to support loading
> configuration from sources like S3 or similar?
> 
> Thanks.



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org