-
Notifications
You must be signed in to change notification settings - Fork 61
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
Ability to log actual table name and column name instead of property name and domain class name respectively #122
Comments
Requirement:
|
@robertoschwald Let me know if you want me to send a PR. You mentioned you think about the table name column over the weekend, but if you want I can send the changes related to COLUMN_NAME column. |
Would be great if you can form a PR. |
Sure. Will work on it over the weekend. |
I have a working solution for COLUMN_NAME as property name in my forked repo. I have an integration test which fails because I am unable to set the config property in integration test. This test should pass because I have used it in a similar way in other applications with Grails 3.1.9. I will look into it more. |
Any news on this? Will you provide a PR? |
@dmahapatro I think setting in applicationContext config is too late at that point. See the new TruncateSpec how I change it directly in the listeners. Please mark it the same way as I did to avoid people to do this nasty thing in real live. thx. |
It will an useful enhancement if we can add configurations like
grails.plugin.auditLog.logTableName
andgrails.plugin.auditLog.logColumnName
to capture the actual table name and column name respectively.They (actual names and domain class property names) can be mutually exclusive or both inclusive if required. That can also be driven by a config item. That is, either we have one or the other or we can have both properties and actual names. Thoughts?
For example, considering the below
Book
domain class;We can have either
Book
as theCLASS_NAME
in theAUDIT_LOG
table orBOOK
(actual table name) asCLASS_NAME
inAUDIT_LOG
table. It would be nice if we capture both. That would need adding a new column to theAUDIT_LOG
table namedTABLE_NAME
. Same goes withPROPERTY_NAME
andCOLUMN_NAME
The text was updated successfully, but these errors were encountered: