Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.18
    • Fix Version/s: 0.9.20
    • Component/s: logback-classic
    • Labels:
      None

      Description

      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?

        Attachments

          Activity

            People

            • Assignee:
              logback-dev Logback dev list
              Reporter:
              ceki Ceki Gülcü
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: