[JIRA] Created: (LBCLASSIC-182) Evaluable properties

Evaluable properties -------------------- Key: LBCLASSIC-182 URL: http://jira.qos.ch/browse/LBCLASSIC-182 Project: logback-classic Issue Type: New Feature Components: Other Affects Versions: 0.9.18 Reporter: Aleksey Didik Assignee: Logback dev list Priority: Minor Necessary to have properties which could be evaluated dynamically in time of configuration file read. Currently we have statical defined property values (by property tag or files) or we could get properties from System properties. In version 0.9.17 was made possibility to save formatted timestamp in property. May be possible to create property evaluator tag, to define some properties value dynamically? Something like this: <property name="hostName" evaluator="a.b.c.HostPropertyEvaluator"> <parameter name="host_type">ip</parameter> </property> Evaluator will be called on property initialization with listed parameters. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-182?page=com.atlassian.jira.plugin.syste... ] Aleksey Didik commented on LBCLASSIC-182: ----------------------------------------- Be better to use this xml notation: <property name="hostName" evaluator="a.b.c.HostPropertyEvaluator"> <hostType">ip</hostType> </property> It's closer to native logback notation.
Evaluable properties --------------------
Key: LBCLASSIC-182 URL: http://jira.qos.ch/browse/LBCLASSIC-182 Project: logback-classic Issue Type: New Feature Components: Other Affects Versions: 0.9.18 Reporter: Aleksey Didik Assignee: Logback dev list Priority: Minor
Necessary to have properties which could be evaluated dynamically in time of configuration file read. Currently we have statical defined property values (by property tag or files) or we could get properties from System properties. In version 0.9.17 was made possibility to save formatted timestamp in property. May be possible to create property evaluator tag, to define some properties value dynamically? Something like this: <property name="hostName" evaluator="a.b.c.HostPropertyEvaluator"> <parameter name="host_type">ip</parameter> </property> Evaluator will be called on property initialization with listed parameters.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-182?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu commented on LBCLASSIC-182: -------------------------------------- In logback 0.9.19-SNAPSHOT, the HOSTNAME variable is defined automatically. This feature was added only last week. Your suggestion is a more extensible mechanism. I would propose the addition of a new action called "define". The XML syntax would be: <define name="somename" class="some.class.defining.the.property"> <parameterA>...</parameterA> <parameterB>...</parameterB> </define> The DefineAction would instantiate the class specified by the class attribute, push it onto the stack. That class would be expected to implement an interface, say PropertyDefiner (see below). Joran will take care of injecting the whatever parameters as given by the parameterA and parameterB elements onto the object found on top of the stack. The DefineAction would then pop the stack, get a value returned by the PropertyDefiner instance and set a context property corresponding to the name attribute and the value returned by PropertyDefiner . Here is a possible PropertyDefiner interface: interface PropertyDefinier { public String getValue(); } Let me know if any of the above is unclear.
Evaluable properties --------------------
Key: LBCLASSIC-182 URL: http://jira.qos.ch/browse/LBCLASSIC-182 Project: logback-classic Issue Type: New Feature Components: Other Affects Versions: 0.9.18 Reporter: Aleksey Didik Assignee: Ceki Gulcu Priority: Minor
Necessary to have properties which could be evaluated dynamically in time of configuration file read. Currently we have statical defined property values (by property tag or files) or we could get properties from System properties. In version 0.9.17 was made possibility to save formatted timestamp in property. May be possible to create property evaluator tag, to define some properties value dynamically? Something like this: <property name="hostName" evaluator="a.b.c.HostPropertyEvaluator"> <parameter name="host_type">ip</parameter> </property> Evaluator will be called on property initialization with listed parameters.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-182?page=com.atlassian.jira.plugin.syste... ] Aleksey Didik commented on LBCLASSIC-182: ----------------------------------------- Ok, looks like all right except one point. Is PropertyDefiner interface extends ContextAware interface? imo - yes, because property defining process can generate some errors or depends on already existed context. If yes, I need to make PropertyDefinerBase extends ContextAwareBase. What do you think?
Evaluable properties --------------------
Key: LBCLASSIC-182 URL: http://jira.qos.ch/browse/LBCLASSIC-182 Project: logback-classic Issue Type: New Feature Components: Other Affects Versions: 0.9.18 Reporter: Aleksey Didik Assignee: Ceki Gulcu Priority: Minor
Necessary to have properties which could be evaluated dynamically in time of configuration file read. Currently we have statical defined property values (by property tag or files) or we could get properties from System properties. In version 0.9.17 was made possibility to save formatted timestamp in property. May be possible to create property evaluator tag, to define some properties value dynamically? Something like this: <property name="hostName" evaluator="a.b.c.HostPropertyEvaluator"> <parameter name="host_type">ip</parameter> </property> Evaluator will be called on property initialization with listed parameters.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-182?page=com.atlassian.jira.plugin.syste... ] Aleksey Didik edited comment on LBCLASSIC-182 at 2/4/10 4:17 PM: ----------------------------------------------------------------- Ok, looks like all implemented except one point. Is PropertyDefiner interface extends ContextAware interface? imo - yes, because property defining process can generate some errors or depends on already existed context. If yes, I need to make PropertyDefinerBase extends ContextAwareBase. What do you think? was (Author: lookout): Ok, looks like all right except one point. Is PropertyDefiner interface extends ContextAware interface? imo - yes, because property defining process can generate some errors or depends on already existed context. If yes, I need to make PropertyDefinerBase extends ContextAwareBase. What do you think?
Evaluable properties --------------------
Key: LBCLASSIC-182 URL: http://jira.qos.ch/browse/LBCLASSIC-182 Project: logback-classic Issue Type: New Feature Components: Other Affects Versions: 0.9.18 Reporter: Aleksey Didik Assignee: Ceki Gulcu Priority: Minor
Necessary to have properties which could be evaluated dynamically in time of configuration file read. Currently we have statical defined property values (by property tag or files) or we could get properties from System properties. In version 0.9.17 was made possibility to save formatted timestamp in property. May be possible to create property evaluator tag, to define some properties value dynamically? Something like this: <property name="hostName" evaluator="a.b.c.HostPropertyEvaluator"> <parameter name="host_type">ip</parameter> </property> Evaluator will be called on property initialization with listed parameters.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-182?page=com.atlassian.jira.plugin.syste... ] Aleksey Didik updated LBCLASSIC-182: ------------------------------------ Attachment: define_property.patch Ok, It's a patch for logback 0.9.19-SNAPSHOT. All changes in logback core. PropertyDefiner interface extends ConntextAware and PropertyDefinerBase class exists. Unit tests exist.
Evaluable properties --------------------
Key: LBCLASSIC-182 URL: http://jira.qos.ch/browse/LBCLASSIC-182 Project: logback-classic Issue Type: New Feature Components: Other Affects Versions: 0.9.18 Reporter: Aleksey Didik Assignee: Ceki Gulcu Priority: Minor Attachments: define_property.patch
Necessary to have properties which could be evaluated dynamically in time of configuration file read. Currently we have statical defined property values (by property tag or files) or we could get properties from System properties. In version 0.9.17 was made possibility to save formatted timestamp in property. May be possible to create property evaluator tag, to define some properties value dynamically? Something like this: <property name="hostName" evaluator="a.b.c.HostPropertyEvaluator"> <parameter name="host_type">ip</parameter> </property> Evaluator will be called on property initialization with listed parameters.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-182?page=com.atlassian.jira.plugin.syste... ] Aleksey Didik updated LBCLASSIC-182: ------------------------------------ Attachment: (was: define_property.patch)
Evaluable properties --------------------
Key: LBCLASSIC-182 URL: http://jira.qos.ch/browse/LBCLASSIC-182 Project: logback-classic Issue Type: New Feature Components: Other Affects Versions: 0.9.18 Reporter: Aleksey Didik Assignee: Ceki Gulcu Priority: Minor Attachments: define_properties_functionality.patch
Necessary to have properties which could be evaluated dynamically in time of configuration file read. Currently we have statical defined property values (by property tag or files) or we could get properties from System properties. In version 0.9.17 was made possibility to save formatted timestamp in property. May be possible to create property evaluator tag, to define some properties value dynamically? Something like this: <property name="hostName" evaluator="a.b.c.HostPropertyEvaluator"> <parameter name="host_type">ip</parameter> </property> Evaluator will be called on property initialization with listed parameters.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-182?page=com.atlassian.jira.plugin.syste... ] Aleksey Didik updated LBCLASSIC-182: ------------------------------------ Attachment: define_properties_functionality.patch
Evaluable properties --------------------
Key: LBCLASSIC-182 URL: http://jira.qos.ch/browse/LBCLASSIC-182 Project: logback-classic Issue Type: New Feature Components: Other Affects Versions: 0.9.18 Reporter: Aleksey Didik Assignee: Ceki Gulcu Priority: Minor Attachments: define_properties_functionality.patch
Necessary to have properties which could be evaluated dynamically in time of configuration file read. Currently we have statical defined property values (by property tag or files) or we could get properties from System properties. In version 0.9.17 was made possibility to save formatted timestamp in property. May be possible to create property evaluator tag, to define some properties value dynamically? Something like this: <property name="hostName" evaluator="a.b.c.HostPropertyEvaluator"> <parameter name="host_type">ip</parameter> </property> Evaluator will be called on property initialization with listed parameters.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-182?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu commented on LBCLASSIC-182: -------------------------------------- Hello Aleksey. The patch looks good. I particularly appreciate the fact your patch contains relevant test cases. Could you place the PropertyDefiner interface under the ch.qos.logback.core.spi package? Since the patch is more than just a few lines, may I ask you to file a CLA? It can be found at http://logback.qos.ch/cla.txt You can file it by land mail or by email after scanning it.
Evaluable properties --------------------
Key: LBCLASSIC-182 URL: http://jira.qos.ch/browse/LBCLASSIC-182 Project: logback-classic Issue Type: New Feature Components: Other Affects Versions: 0.9.18 Reporter: Aleksey Didik Assignee: Ceki Gulcu Priority: Minor Attachments: define_properties_functionality.patch
Necessary to have properties which could be evaluated dynamically in time of configuration file read. Currently we have statical defined property values (by property tag or files) or we could get properties from System properties. In version 0.9.17 was made possibility to save formatted timestamp in property. May be possible to create property evaluator tag, to define some properties value dynamically? Something like this: <property name="hostName" evaluator="a.b.c.HostPropertyEvaluator"> <parameter name="host_type">ip</parameter> </property> Evaluator will be called on property initialization with listed parameters.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-182?page=com.atlassian.jira.plugin.syste... ] Aleksey Didik updated LBCLASSIC-182: ------------------------------------ Attachment: (was: define_properties_functionality.patch)
Evaluable properties --------------------
Key: LBCLASSIC-182 URL: http://jira.qos.ch/browse/LBCLASSIC-182 Project: logback-classic Issue Type: New Feature Components: Other Affects Versions: 0.9.18 Reporter: Aleksey Didik Assignee: Ceki Gulcu Priority: Minor
Necessary to have properties which could be evaluated dynamically in time of configuration file read. Currently we have statical defined property values (by property tag or files) or we could get properties from System properties. In version 0.9.17 was made possibility to save formatted timestamp in property. May be possible to create property evaluator tag, to define some properties value dynamically? Something like this: <property name="hostName" evaluator="a.b.c.HostPropertyEvaluator"> <parameter name="host_type">ip</parameter> </property> Evaluator will be called on property initialization with listed parameters.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-182?page=com.atlassian.jira.plugin.syste... ] Aleksey Didik updated LBCLASSIC-182: ------------------------------------ Attachment: define_properties_functionality.patch Patch with classes and tests.
Evaluable properties --------------------
Key: LBCLASSIC-182 URL: http://jira.qos.ch/browse/LBCLASSIC-182 Project: logback-classic Issue Type: New Feature Components: Other Affects Versions: 0.9.18 Reporter: Aleksey Didik Assignee: Ceki Gulcu Priority: Minor Attachments: define_properties_functionality.patch
Necessary to have properties which could be evaluated dynamically in time of configuration file read. Currently we have statical defined property values (by property tag or files) or we could get properties from System properties. In version 0.9.17 was made possibility to save formatted timestamp in property. May be possible to create property evaluator tag, to define some properties value dynamically? Something like this: <property name="hostName" evaluator="a.b.c.HostPropertyEvaluator"> <parameter name="host_type">ip</parameter> </property> Evaluator will be called on property initialization with listed parameters.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-182?page=com.atlassian.jira.plugin.syste... ] Aleksey Didik edited comment on LBCLASSIC-182 at 3/26/10 9:46 AM: ------------------------------------------------------------------ Ok, I have moved PropertyDefiner to ch.qos.logback.core.spi. Renewed patch with classes and tests in attachement. I have printed and signed CLA, I'll send it to you by email in scanned form in few days.. was (Author: lookout): Patch with classes and tests.
Evaluable properties --------------------
Key: LBCLASSIC-182 URL: http://jira.qos.ch/browse/LBCLASSIC-182 Project: logback-classic Issue Type: New Feature Components: Other Affects Versions: 0.9.18 Reporter: Aleksey Didik Assignee: Ceki Gulcu Priority: Minor Attachments: define_properties_functionality.patch
Necessary to have properties which could be evaluated dynamically in time of configuration file read. Currently we have statical defined property values (by property tag or files) or we could get properties from System properties. In version 0.9.17 was made possibility to save formatted timestamp in property. May be possible to create property evaluator tag, to define some properties value dynamically? Something like this: <property name="hostName" evaluator="a.b.c.HostPropertyEvaluator"> <parameter name="host_type">ip</parameter> </property> Evaluator will be called on property initialization with listed parameters.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-182?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu commented on LBCLASSIC-182: -------------------------------------- Hello Aleksey. While applying your patch, I noticed that the PropertyDefinerBase class contained a copyright notice with the mention "Magenta Corporation Ltd". Was that intended? Given the file in question, I suppose not but you never know.
Evaluable properties --------------------
Key: LBCLASSIC-182 URL: http://jira.qos.ch/browse/LBCLASSIC-182 Project: logback-classic Issue Type: New Feature Components: Other Affects Versions: 0.9.18 Reporter: Aleksey Didik Assignee: Ceki Gulcu Priority: Minor Attachments: define_properties_functionality.patch
Necessary to have properties which could be evaluated dynamically in time of configuration file read. Currently we have statical defined property values (by property tag or files) or we could get properties from System properties. In version 0.9.17 was made possibility to save formatted timestamp in property. May be possible to create property evaluator tag, to define some properties value dynamically? Something like this: <property name="hostName" evaluator="a.b.c.HostPropertyEvaluator"> <parameter name="host_type">ip</parameter> </property> Evaluator will be called on property initialization with listed parameters.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-182?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu commented on LBCLASSIC-182: -------------------------------------- The class containing the "Magenta Corporation Ltd" was FooPropertyDefiner. Given that the other classes do have this copyright notice and the simplicity of the FooPropertyDefiner, I am guessing that the copyright notice was automatically inserted by a template in your IDE. I have replaced the file with a different one serving a similar purpose (testing). You don't have to do anything,
Evaluable properties --------------------
Key: LBCLASSIC-182 URL: http://jira.qos.ch/browse/LBCLASSIC-182 Project: logback-classic Issue Type: New Feature Components: Other Affects Versions: 0.9.18 Reporter: Aleksey Didik Assignee: Ceki Gulcu Priority: Minor Attachments: define_properties_functionality.patch
Necessary to have properties which could be evaluated dynamically in time of configuration file read. Currently we have statical defined property values (by property tag or files) or we could get properties from System properties. In version 0.9.17 was made possibility to save formatted timestamp in property. May be possible to create property evaluator tag, to define some properties value dynamically? Something like this: <property name="hostName" evaluator="a.b.c.HostPropertyEvaluator"> <parameter name="host_type">ip</parameter> </property> Evaluator will be called on property initialization with listed parameters.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-182?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu edited comment on LBCLASSIC-182 at 3/31/10 2:55 PM: --------------------------------------------------------------- The class containing the "Magenta Corporation Ltd" was FooPropertyDefiner. Given that the other classes do NOT have this copyright notice and the simplicity of the FooPropertyDefiner class, I am guessing that the copyright notice was automatically inserted by a template in your IDE. I have replaced FooPropertyDefiner with a class called AsLowerCasePropertyDefiner serving a similar purpose (testing). You don't have to take any further on your end. By the way, your patch shows very good understanding of Joran. Good work. was (Author: noreply.ceki@qos.ch): The class containing the "Magenta Corporation Ltd" was FooPropertyDefiner. Given that the other classes do have this copyright notice and the simplicity of the FooPropertyDefiner, I am guessing that the copyright notice was automatically inserted by a template in your IDE. I have replaced the file with a different one serving a similar purpose (testing). You don't have to do anything,
Evaluable properties --------------------
Key: LBCLASSIC-182 URL: http://jira.qos.ch/browse/LBCLASSIC-182 Project: logback-classic Issue Type: New Feature Components: Other Affects Versions: 0.9.18 Reporter: Aleksey Didik Assignee: Ceki Gulcu Priority: Minor Attachments: define_properties_functionality.patch
Necessary to have properties which could be evaluated dynamically in time of configuration file read. Currently we have statical defined property values (by property tag or files) or we could get properties from System properties. In version 0.9.17 was made possibility to save formatted timestamp in property. May be possible to create property evaluator tag, to define some properties value dynamically? Something like this: <property name="hostName" evaluator="a.b.c.HostPropertyEvaluator"> <parameter name="host_type">ip</parameter> </property> Evaluator will be called on property initialization with listed parameters.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-182?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu resolved LBCLASSIC-182. ---------------------------------- Fix Version/s: 0.9.20 Resolution: Fixed Fixed in http://github.com/ceki/logback/commit/4bca7fd336
Evaluable properties --------------------
Key: LBCLASSIC-182 URL: http://jira.qos.ch/browse/LBCLASSIC-182 Project: logback-classic Issue Type: New Feature Components: Other Affects Versions: 0.9.18 Reporter: Aleksey Didik Assignee: Ceki Gulcu Priority: Minor Fix For: 0.9.20
Attachments: define_properties_functionality.patch
Necessary to have properties which could be evaluated dynamically in time of configuration file read. Currently we have statical defined property values (by property tag or files) or we could get properties from System properties. In version 0.9.17 was made possibility to save formatted timestamp in property. May be possible to create property evaluator tag, to define some properties value dynamically? Something like this: <property name="hostName" evaluator="a.b.c.HostPropertyEvaluator"> <parameter name="host_type">ip</parameter> </property> Evaluator will be called on property initialization with listed parameters.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-182?page=com.atlassian.jira.plugin.syste... ] Aleksey Didik commented on LBCLASSIC-182: ----------------------------------------- Hello Ceki, you are right, I just forgot to delete automaticaly inserted class head from those classes. I'll rebuild patch for future using. Glad to made something for logback :)
Evaluable properties --------------------
Key: LBCLASSIC-182 URL: http://jira.qos.ch/browse/LBCLASSIC-182 Project: logback-classic Issue Type: New Feature Components: Other Affects Versions: 0.9.18 Reporter: Aleksey Didik Assignee: Ceki Gulcu Priority: Minor Fix For: 0.9.20
Attachments: define_properties_functionality.patch
Necessary to have properties which could be evaluated dynamically in time of configuration file read. Currently we have statical defined property values (by property tag or files) or we could get properties from System properties. In version 0.9.17 was made possibility to save formatted timestamp in property. May be possible to create property evaluator tag, to define some properties value dynamically? Something like this: <property name="hostName" evaluator="a.b.c.HostPropertyEvaluator"> <parameter name="host_type">ip</parameter> </property> Evaluator will be called on property initialization with listed parameters.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
participants (2)
-
Aleksey Didik (JIRA)
-
Ceki Gulcu (JIRA)