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 Enric Jaen <en...@yahoo.es.INVALID> on 2018/03/29 15:29:27 UTC

Configure appender from database

Hello, 
I know is possible to change the configuration file dynamically, but I wonder if could be possible to configure appenders from a database, without needing to reload the full configuration file. A useful case would be  to change the log level of the appender.
RegardsEnric





Re: Configure appender from database

Posted by Gary Gregory <ga...@gmail.com>.
Right, I've dealt with configuring various things from databases in the
past, and there is no one-size-fits-all way of doing this. This is why I
mentioned a KISS set up if we were to provide anything in that dept.

Gary

On Thu, Mar 29, 2018 at 11:39 AM, Ralph Goers <ra...@dslextreme.com>
wrote:

> I could think of all kinds of weird ways to do this. I could imagine an
> Appender table, a Logger table, a Properties table, etc. But at some point
> this stuff becomes somewhat free form so the schema would have to account
> for that.
>
> Ralph
>
> On Mar 29, 2018, at 10:33 AM, Gary Gregory <ga...@gmail.com> wrote:
>
> Interesting. The simplest would be a new JDBC configuration class in Log4j
> that gets a complete XML document string from DB table's column...
>
> Gary
>
> On Thu, Mar 29, 2018, 11:28 Enric Jaen <en...@yahoo.es.invalid> wrote:
>
>> Yes, log4j internally would generate the new xml configuration
>>
>>
>>     En jueves, 29 de marzo de 2018 17:05:26 GMT+1, Ralph Goers <
>> ralph.goers@dslextreme.com> escribió:
>>
>>  Will a database configuration could certainly be supported somehow, any
>> changes to it would most likely still end up in a full reconfiguration as
>> that is how Log4j generally handles changes to the configuration it detects.
>>
>> Ralph
>>
>> > On Mar 29, 2018, at 8:29 AM, Enric Jaen <en...@yahoo.es.INVALID>
>> wrote:
>> >
>> > Hello,
>> > I know is possible to change the configuration file dynamically, but I
>> wonder if could be possible to configure appenders from a database, without
>> needing to reload the full configuration file. A useful case would be  to
>> change the log level of the appender.
>> > RegardsEnric
>> >
>> >
>> >
>> >
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>
>
>

Re: Configure appender from database

Posted by Gary Gregory <ga...@gmail.com>.
On Thu, Mar 29, 2018 at 12:04 PM, Enric Jaen <en...@yahoo.es> wrote:

> or get the json configuration from a NoSQL database
>

That's a different beast as there is no JDBC for NoSQL...

Gary


>
> Enric
>
>
> En jueves, 29 de marzo de 2018 18:40:23 GMT+1, Ralph Goers <
> ralph.goers@dslextreme.com> escribió:
>
>
> I could think of all kinds of weird ways to do this. I could imagine an
> Appender table, a Logger table, a Properties table, etc. But at some point
> this stuff becomes somewhat free form so the schema would have to account
> for that.
>
> Ralph
>
> > On Mar 29, 2018, at 10:33 AM, Gary Gregory <ga...@gmail.com>
> wrote:
> >
> > Interesting. The simplest would be a new JDBC configuration class in
> Log4j that gets a complete XML document string from DB table's column...
> >
> > Gary
> >
> > On Thu, Mar 29, 2018, 11:28 Enric Jaen <en...@yahoo.es.invalid>
> wrote:
> > Yes, log4j internally would generate the new xml configuration
> >
> >
> >    En jueves, 29 de marzo de 2018 17:05:26 GMT+1, Ralph Goers <
> ralph.goers@dslextreme.com <ma...@dslextreme.com>> escribió:
> >
> >  Will a database configuration could certainly be supported somehow, any
> changes to it would most likely still end up in a full reconfiguration as
> that is how Log4j generally handles changes to the configuration it detects.
> >
> > Ralph
> >
> > > On Mar 29, 2018, at 8:29 AM, Enric Jaen <en...@yahoo.es.INVALID>
> wrote:
> > >
> > > Hello,
> > > I know is possible to change the configuration file dynamically, but I
> wonder if could be possible to configure appenders from a database, without
> needing to reload the full configuration file. A useful case would be  to
> change the log level of the appender.
> > > RegardsEnric
> > >
> > >
> > >
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> <ma...@logging.apache.org>
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> <ma...@logging.apache.org>
>
> >
>

Re: Configure appender from database

Posted by Enric Jaen <en...@yahoo.es.INVALID>.
or get the json configuration from a NoSQL database
Enric
 

    En jueves, 29 de marzo de 2018 18:40:23 GMT+1, Ralph Goers <ra...@dslextreme.com> escribió:  
 
 I could think of all kinds of weird ways to do this. I could imagine an Appender table, a Logger table, a Properties table, etc. But at some point this stuff becomes somewhat free form so the schema would have to account for that.

Ralph

> On Mar 29, 2018, at 10:33 AM, Gary Gregory <ga...@gmail.com> wrote:
> 
> Interesting. The simplest would be a new JDBC configuration class in Log4j that gets a complete XML document string from DB table's column...
> 
> Gary 
> 
> On Thu, Mar 29, 2018, 11:28 Enric Jaen <en...@yahoo.es.invalid> wrote:
> Yes, log4j internally would generate the new xml configuration
> 
> 
>    En jueves, 29 de marzo de 2018 17:05:26 GMT+1, Ralph Goers <ralph.goers@dslextreme.com <ma...@dslextreme.com>> escribió:
> 
>  Will a database configuration could certainly be supported somehow, any changes to it would most likely still end up in a full reconfiguration as that is how Log4j generally handles changes to the configuration it detects.
> 
> Ralph
> 
> > On Mar 29, 2018, at 8:29 AM, Enric Jaen <en...@yahoo.es.INVALID> wrote:
> >
> > Hello,
> > I know is possible to change the configuration file dynamically, but I wonder if could be possible to configure appenders from a database, without needing to reload the full configuration file. A useful case would be  to change the log level of the appender.
> > RegardsEnric
> >
> >
> >
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org <ma...@logging.apache.org>
> For additional commands, e-mail: log4j-user-help@logging.apache.org <ma...@logging.apache.org>
>  
  

Re: Configure appender from database

Posted by Ralph Goers <ra...@dslextreme.com>.
I could think of all kinds of weird ways to do this. I could imagine an Appender table, a Logger table, a Properties table, etc. But at some point this stuff becomes somewhat free form so the schema would have to account for that.

Ralph

> On Mar 29, 2018, at 10:33 AM, Gary Gregory <ga...@gmail.com> wrote:
> 
> Interesting. The simplest would be a new JDBC configuration class in Log4j that gets a complete XML document string from DB table's column...
> 
> Gary 
> 
> On Thu, Mar 29, 2018, 11:28 Enric Jaen <en...@yahoo.es.invalid> wrote:
> Yes, log4j internally would generate the new xml configuration
> 
> 
>     En jueves, 29 de marzo de 2018 17:05:26 GMT+1, Ralph Goers <ralph.goers@dslextreme.com <ma...@dslextreme.com>> escribió:
> 
>  Will a database configuration could certainly be supported somehow, any changes to it would most likely still end up in a full reconfiguration as that is how Log4j generally handles changes to the configuration it detects.
> 
> Ralph
> 
> > On Mar 29, 2018, at 8:29 AM, Enric Jaen <en...@yahoo.es.INVALID> wrote:
> >
> > Hello,
> > I know is possible to change the configuration file dynamically, but I wonder if could be possible to configure appenders from a database, without needing to reload the full configuration file. A useful case would be  to change the log level of the appender.
> > RegardsEnric
> >
> >
> >
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org <ma...@logging.apache.org>
> For additional commands, e-mail: log4j-user-help@logging.apache.org <ma...@logging.apache.org>
>  


Re: Configure appender from database

Posted by Gary Gregory <ga...@gmail.com>.
Interesting. The simplest would be a new JDBC configuration class in Log4j
that gets a complete XML document string from DB table's column...

Gary

On Thu, Mar 29, 2018, 11:28 Enric Jaen <en...@yahoo.es.invalid> wrote:

> Yes, log4j internally would generate the new xml configuration
>
>
>     En jueves, 29 de marzo de 2018 17:05:26 GMT+1, Ralph Goers <
> ralph.goers@dslextreme.com> escribió:
>
>  Will a database configuration could certainly be supported somehow, any
> changes to it would most likely still end up in a full reconfiguration as
> that is how Log4j generally handles changes to the configuration it detects.
>
> Ralph
>
> > On Mar 29, 2018, at 8:29 AM, Enric Jaen <en...@yahoo.es.INVALID>
> wrote:
> >
> > Hello,
> > I know is possible to change the configuration file dynamically, but I
> wonder if could be possible to configure appenders from a database, without
> needing to reload the full configuration file. A useful case would be  to
> change the log level of the appender.
> > RegardsEnric
> >
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>

Re: Configure appender from database

Posted by Enric Jaen <en...@yahoo.es.INVALID>.
Yes, log4j internally would generate the new xml configuration
 

    En jueves, 29 de marzo de 2018 17:05:26 GMT+1, Ralph Goers <ra...@dslextreme.com> escribió:  
 
 Will a database configuration could certainly be supported somehow, any changes to it would most likely still end up in a full reconfiguration as that is how Log4j generally handles changes to the configuration it detects.

Ralph

> On Mar 29, 2018, at 8:29 AM, Enric Jaen <en...@yahoo.es.INVALID> wrote:
> 
> Hello, 
> I know is possible to change the configuration file dynamically, but I wonder if could be possible to configure appenders from a database, without needing to reload the full configuration file. A useful case would be  to change the log level of the appender.
> RegardsEnric
> 
> 
> 
> 



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

Re: Configure appender from database

Posted by Ralph Goers <ra...@dslextreme.com>.
Will a database configuration could certainly be supported somehow, any changes to it would most likely still end up in a full reconfiguration as that is how Log4j generally handles changes to the configuration it detects.

Ralph

> On Mar 29, 2018, at 8:29 AM, Enric Jaen <en...@yahoo.es.INVALID> wrote:
> 
> Hello, 
> I know is possible to change the configuration file dynamically, but I wonder if could be possible to configure appenders from a database, without needing to reload the full configuration file. A useful case would be  to change the log level of the appender.
> RegardsEnric
> 
> 
> 
> 



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