Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft of changes to introduce new log placeholder "attributes". #485

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

the-w1nd
Copy link

@the-w1nd the-w1nd commented Aug 21, 2019

The placeholder for the CustomLineFormat will allow additional attributes to be logged for the Connection, Statement and ResultSet objects. The list of attributes to include in the log will be specified in the suffix of the placeholder like this:

%(attributes:*) - log all captured attributes of the current Category
%(attributes:Statement.*) - log all attributes only for "statement" Category
%(attributes:Connection.getSchema,Statement.isAutoCommitted,ResultSet.*) - log the specified attributes only

This is a draft:

  • the list of attributes for each Category is not final and can be extended at any point
  • the tests have not been created yet

The placeholder for the CustomLineFormat will allow additional attributes to be logged for the Connection, Statement and ResultSet objects.  The list of attributes to include in the log will be specified in the suffix of the placeholder like this:
    %(attributes:*) - log all captured attributes of the current Category
    %(attributes:Statement.*) - log all attributes only for "statement" Category
    %(attributes:Connection.getSchema,Statement.isAutoCommitted,ResultSet.*) - log the specified attributes only

 This is a draft:
 - the list of attributes for each Category is not final and can be extended at any point
 - the tests have not been created yet
m.appendTail(output);
} catch (Exception ex) {
// Make sure that any exceptions from the Matcher are not breaking the main application
System.out.println("=== Got Exception : " + Arrays.toString(ex.getStackTrace()));
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All "System.out.println" calls are going to be removed. Forgot to clean up while learning how to make GitHub forks and pull requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant