[ 
http://jira.qos.ch/browse/LBCLASSIC-188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11640#action_11640
 ] 

Ceki Gulcu edited comment on LBCLASSIC-188 at 3/19/10 1:43 PM:
---------------------------------------------------------------

Got the CLA. Thank you. (I can now merge the dbname branch into master.)

Coming back to the issue of configuring CustomDBNameResolver via XML, one very 
simple table and column naming strategy would be to add a prefix (or a suffix) 
to the standard name.  So a CustomDBNameResolver  could take a few parameters 
such as tableNamePrefix, tableNameSuffix, columnNamePrefix, and 
columnNameSuffix which is trivially easy for joran to deal with.


      was (Author: [email protected]):
    Got the CLA. Thank you.

Coming back to the issue of configuring CustomDBNameResolver via XML, one very 
simple table and column naming strategy would be to add a prefix (or a suffix) 
to the standard name.  So a CustomDBNameResolver  could take a few parameters 
such as tableNamePrefix, tableNameSuffix, columnNamePrefix, and 
columnNameSuffix which is trivially easy for joran to deal with.

  
> Make table and column names overridable
> ---------------------------------------
>
>                 Key: LBCLASSIC-188
>                 URL: http://jira.qos.ch/browse/LBCLASSIC-188
>             Project: logback-classic
>          Issue Type: Sub-task
>          Components: appender
>    Affects Versions: 0.9.18
>            Reporter: Ceki Gulcu
>            Assignee: Logback dev list
>
> To comply with local project rules, it can be helpful if the table and column 
> names used by DBAppender could be overridden. The easiest way to solve this 
> problem is for  DBAppender  to delegate the resolution of table names and 
> columns to a different class, say DBNameResolver. Here is a possible 
> interface:
> interface DBNameResolver {
>   String getTableName(String standardTableName);
>   String getColumnName(String standardColumnName);
> }
> The default implementation of DBNameResolver could be:
> class DefaulDBNameResolver implements DBNameResolver {
>   public String getTableName(String standardTableName) {
>     if("logging_event".equals(standardTableName) {
>       return standardTableName;
>     }
>     if("logging_event_property".equals(standardTableName) {
>       return standardTableName;
>     }
>     if("logging_event_exception".equals(standardTableName) {
>       return standardTableName;
>     }
>     throw new IllegalArgumentException(standardTableName + " is an unknown 
> table name");
>   }
>   String getColumnName(String standardColumnName) {
>      ...
>   }
> }
> If a user wanted to use different names she would simply implement 
> DBNameResolver according to her requirements.
> Any volunteers to implement this?

-- 
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

        
_______________________________________________
logback-dev mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-dev

Reply via email to