symentis / grails-audit-logging-plugin Goto Github PK
View Code? Open in Web Editor NEWThe Grails Audit Logging Plugin
License: Apache License 2.0
The Grails Audit Logging Plugin
License: Apache License 2.0
Original Reporter: hartsock
Environment: Not Specified
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-26
Original Reporter: gpinkham
Environment: Not Specified
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-39
Original Reporter: mgkimsal
Environment: Not Specified
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-27
I've got some domain methods that seem to be introducing a new property in to the mix, but aren't part of the domain.
class student {
String fname
String lname
def getName() {
fname + " " + lname
}
}
when audit logging, it's trying to do an audit on a 'name' property, which doesn't seem to be right, imo.
Having a property in the class (or some setting somewhere) with a list of properties to skip would help avoid this issue.
Original Reporter: amalbet
Environment: Not Specified
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-22
I would like to propose these enhancements for next release:
While there is a spot in the AuditLogEvent object for the persisted object's version, it is dealt with inconsistently and does not behave as expected.
With the default configuration, the only event that captures the persisted object version is the DELETE event. The rest of the events seem to discard the version for various reasons. (ie. special handling in the logChanges()
code, significantChange()
stripping "ignored" fields, default ignored
field list including it)
It would be best if this was dealt with in a consistent way, and ideally to always include the persisted object version, since that identifies the object version that was changing. To put it another way, the object ID + version is the "change group identifier" to tell what fields all changed at once.
Original Reporter: sgv
Environment: version 0.4
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-7
Original Reporter: roos
Environment: Not Specified
Version: Grails-AuditLogging 0.5.4
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-45
Original Reporter: wal5hy
Environment: Not Specified
Version: Grails-AuditLogging 0.5.4
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-20
Would be really great to be able to use the audit plugin to generate human readable change description column in the audit table. For example:
"Joe blogs updated product TG-238 by changing number of legs from 3 to 4"
in pseudo-pseudocode:
"${actor} updated ${Class.name} ${humanReadableID} by changing ${key} from "+ oldMap[key] + " to " + newMap[key]
and then the simpler case for insert and delete:
"${actor} deleted ${Class.name} ${humanReadableID}"
"${actor} created ${Class.name} ${humanReadableID}"
which can nearly be created from the current columns in the generated audit table, the only value which is missing is the human readable unique Identifier, ( in the case of a product the unique identifier is the products part number). (And i guess it doesn't necessarily have to be unique, just understandable)
Finally in the domain class mark the human readable Identifier in some way maybe:
static auditable = [humanReadableID:partnum]
This may get a little more complex for many-to-many relations, but equally useful for an end user to understand whats changed in the system.
"Approval FCC added to Product TG-238"
maybe the ordering of the above sentence can be figured out with the belongsTo property?
I'm very new to Groovy so unable to really know how big a change this is, tried looking through the source but am struggling at the moment.
Original Reporter: hartsock
Environment: Not Specified
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-19
From this thread:
[Audit Logging Association|http://grails.1312388.n4.nabble.com/Audit-Logging-Association-tp1564763p1564958.html]
here's what I had to do to make this work.
Original Reporter: sp
Environment: Grails 2.3.4
Version: Grails-AuditLogging 0.5.5.3
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-49
In the below code oldMap[keyName] = Collections.unmodifiableList((List) snapshot); will throw an exception in the case when the snapshot is null
{code}
private populateOldStateMap(def oldState, Map oldMap, String keyName, int index) {
def oldPropertyState = oldState[index]
if (oldPropertyState instanceof PersistentCollection) {
PersistentCollection pc = (PersistentCollection) oldPropertyState;
PersistenceContext context = sessionFactory.getCurrentSession().getPersistenceContext();
CollectionEntry entry = context.getCollectionEntry(pc);
Object snapshot = entry.getSnapshot();
if (pc instanceof List) {
oldMap[keyName] = Collections.unmodifiableList((List) snapshot);
} else if (pc instanceof Map) {
oldMap[keyName] = Collections.unmodifiableMap((Map) snapshot);
} else if (pc instanceof Set) {
//Set snapshot is actually stored as a Map
if (snapshot) {
Map snapshotMap = (Map) snapshot;
oldMap[keyName] = Collections.unmodifiableSet(new HashSet(snapshotMap?.values()));
log.trace(oldMap[keyName].class);
} else {
log.trace("Cannot get snapshot of $pc Entry: $entry for keyName: $keyName");
oldMap[keyName] = null
}
} else {
oldMap[keyName] = pc;
}
} else {
oldMap[keyName] = oldPropertyState
}
}
{code}
Original Reporter: cahya
Environment: Not Specified
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-18
It would be great if we can change the table name audit_log to something else in the configuration file.
Thanks.
Original Reporter: ashishj01
Environment: PreProduction
Version: Grails-AuditLogging 0.5.4
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-2
Domain class that has a collection of another domain object doesn not log correctly.
Let me try to explain the scenario :
Firstly, why is the value of oldMap set to [] in all cases. Shouldnt the default behaviour have the values in the collection set in oldMap. Is there anything special I need to do in my code to set the oldMap to correct values?
This is a show stopper for us and needs to be addressed urgently. If you know the fix , can you send the details so that we can edit the plugin at our end and use it.
Original Reporter: joel21218
Environment: Not Specified
Version: Grails-AuditLogging 0.5.3
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-13
Original Reporter: criggs
Environment: Not Specified
Version: Grails-AuditLogging 0.5.4
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-24
While the saveAuditLog closure can be overridden already, it should follow the same convention as the closure for getting the current actor. Also, the Event class that is passed to the closure should not be a Domain class since this assumes that the save is using that domain class.
I've created a patch that allows for the save closure to be set from Config.groovy. It also renames the AuditLogEvent domain class to AuditLogEventRecord and adds a POGO AuditLogEvent class for passing to the save closure.
Original Reporter: siddharthoak
Environment: Not Specified
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-1
The onPreDelete and onPostInsert invoke the makeMap() method to populate the map that contains the data that is persisted in the Augit_Log table.
The significantChange() method which is invoked when an UPDATE occurs; removes the items from the map that are mentioned in the ignoreList. But, the method - makeMap() does not take into consideration the ignoreList and adds all the properties of an auditable object.
Original Reporter: roos
Environment: Not Specified
Version: Grails-AuditLogging 0.5.5.3
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-48
With Grails 2.0, we can use the Persistency event listeners, so we are independent of Hibernate.
Original Reporter: mlk
Environment: MySQL
Version: Grails-AuditLogging 0.5.3
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-3
In our product we have encountered values being logged as changed even though they are not.
In other words oldValue==newValue for a lot of rows in the auditlog table.
The problem is that sometimes, when it compares the old value with a new value, it ends up comparing a value of class HibernateProxy to a value of class String.
We have fixed this by modifying AuditLogListener.groovy.
We have added the method:
{code:java}
def retrieveNonProxyValueIfApplicable(value) {
def v = value
if( v instanceof HibernateProxy ) {
v = ((HibernateProxy)v).getHibernateLazyInitializer().getImplementation();
}
return v
}
{code}
and changed these lines in the onChange method:
{code:java}
if(oldState) oldMap[nameMap[ii]] = oldState[ii]
if(newState) newMap[nameMap[ii]] = newState[ii]
{code}
to:
{code:java}
if(oldState) oldMap[nameMap[ii]] = retrieveNonProxyValueIfApplicable(oldState[ii])
if(newState) newMap[nameMap[ii]] = retrieveNonProxyValueIfApplicable(newState[ii])
{code}
Hope this helps others confronted with the same issue.
/Morten
Original Reporter: amalbet
Environment: Not Specified
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-31
Original Reporter: cummingscs
Environment: Not Specified
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-9
In Grails 1.3 and 1.3.1, audible domain classes fail to be deleted, yet there is no error or stacktrace indicating that something went wrong. Here [1] is code that demonstrates the issue in a project with audit-logging-0.5.2 plugin installed.
Original Reporter: hartsock
Environment: Grails 1.1.2
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-25
Users of older versions of Grails cannot use newer versions of the Audit Logging plugin because the plugin lists 1.2 in its application.properties file. There is no requirement for that version in the project itself.
Original Reporter: pdlocke
Environment: h2, grails 2.0.3
Version: Grails-AuditLogging 0.5.4
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-36
Original Reporter: martinstephenson
Environment: WIndows 7, SpringSource 2.7.1, Grails 1.3.7, mySQL 5.5.8
Version: Grails-AuditLogging 0.5.4
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-34
I am trying to use the Audit Loggin plugin but cannot get it to run with mySql - If I switch back to the default hsqldb in DataSource.groovy I do not get the error
Welcome to Grails 1.3.7 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: C:\Program Files\springsource\grails-1.3.7\
Base Directory: C:\Development\Springsource\AuditLogTest
Resolving dependencies...
Dependencies resolved in 1042ms.
Running script C:\Program Files\springsource\grails-1.3.7\scripts\RunApp.groovy
Environment set to development
[groovyc] Compiling 2 source files to C:\Development\Springsource\AuditLogTest\target\classes
[delete] Deleting directory C:\Users\Martin Stephenson.grails\1.3.7\projects\AuditLogTest\tomcat
Running Grails application..
2011-09-12 20:05:47,405 [main] ERROR context.GrailsContextLoader - Error executing bootstraps: Error creating bean with name 'messageSource': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.cache.NoCachingEnabledException: Second-level cache is not enabled for usage [hibernate.cache.use_second_level_cache | hibernate.cache.use_query_cache]
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageSource': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.cache.NoCachingEnabledException: Second-level cache is not enabled for usage [hibernate.cache.use_second_level_cache | hibernate.cache.use_query_cache]
at org.grails.tomcat.TomcatServer.start(TomcatServer.groovy:212)
at grails.web.container.EmbeddableServer$start.call(Unknown Source)
at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy:158)
at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy)
at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:280)
at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy)
at _GrailsRun_groovy$_run_closure5.doCall(_GrailsRun_groovy:149)
at _GrailsRun_groovy$_run_closure5.call(_GrailsRun_groovy)
at _GrailsRun_groovy.runInline(_GrailsRun_groovy:116)
at _GrailsRun_groovy.this$4$runInline(_GrailsRun_groovy)
at _GrailsRun_groovy$_run_closure1.doCall(_GrailsRun_groovy:59)
at RunApp$_run_closure1.doCall(RunApp:33)
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:427)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:415)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.executeTargets(Gant.groovy:590)
at gant.Gant.executeTargets(Gant.groovy:589)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.cache.NoCachingEnabledException: Second-level cache is not enabled for usage [hibernate.cache.use_second_level_cache | hibernate.cache.use_query_cache]
... 23 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.cache.NoCachingEnabledException: Second-level cache is not enabled for usage [hibernate.cache.use_second_level_cache | hibernate.cache.use_query_cache]
... 23 more
Caused by: org.hibernate.cache.NoCachingEnabledException: Second-level cache is not enabled for usage [hibernate.cache.use_second_level_cache | hibernate.cache.use_query_cache]
... 23 more
dataSource {
pooled = true
driverClassName = "com.mysql.jdbc.Driver"
username = "root"
password = ""
hibernate {
cache.use_second_level_cache = true
cache.use_query_cache = true
cache.provider_class = 'net.sf.ehcache.hibernate.EhCacheProvider'
}
// environment specific settings
environments {
development {
dataSource {
dbCreate = "update" // one of 'create', 'create-drop','update'
url = "jdbc:mysql://127.0.0.1:3306/AUDIT_DEV"
}
}
test {
dataSource {
dbCreate = "update"
url = "jdbc:mysql://127.0.0.1:3306/AUDIT_TEST"
}
}
production {
dataSource {
dbCreate = "update"
url = "jdbc:mysql://127.0.0.1:3306/AUDIT_PROD"
}
}
}
}
Original Reporter: [email protected]
Environment: Not Specified
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-16
Original Reporter: jbarmash
Environment: Plugin Version 0.5.2, Grails 1.2.2
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-6
It looks like the plugin tries to add the PreDeleteEventListerer and others without affecting other listeners, but the events don't fire.
I put in a simple workaround to check for it, here is an example for AuditLogListener.onPostInsert() - put this towards the end of the method after audit logging has executed.
if (entity.metaClass.respondsTo(entity, 'afterInsert')) {
log.error "afterInsert exists on domain Class ${event.getEntity().getClass().getName()}. Calling it"
entity.afterInsert()
}
Original Reporter: tmc_chandra
Environment: Not Specified
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-30
Currently the audit logging plugins always use "audit_log" as tablename.
It should allow changing this default table name to user specified tablename at configuration file.
Original Reporter: roos
Environment: Not Specified
Version: Grails-AuditLogging 0.5.5.2
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-46
add auditLog.disable=true to disable audit logging. Can be used e.g. if you need to BootStrap many objects and want to disable auditing for this to not slow down the BootStrap process.
There are occasionally properties that are in every domain class and it would be great to be able to set the default ignore list rather than having to set it for each domain class.
Original Reporter: mfk0213
Environment: Not Specified
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-10
The Audit-Logging plugin's gsps do not point to the home of the project for the "home" links.
I installed and configured Acegi, then installed the Audit-Logging plugin, which works perfectly in capturing audit data. When I go to the audit logging controller list view, the home button points to $project_home/plugins/audit-logging-0.5 instead of $project_home/index.gsp
Original Reporter: roos
Environment: Not Specified
Version: Grails-AuditLogging 0.5.4
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-42
Original Reporter: mecameron
Environment: Not Specified
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-15
Creating a simple domain class with one string field that must be unique fails to observe the transaction boundary of tests if the domain class is marked as auditable.
This worked in Grails 1.2.0, but broke when I tried to upgrade to 1.3.2.
The domain class is simply:
{code}
class User {
String name
static auditable = true
static constraints = {
name(unique:true)
}
}
{code}
And test:
{code}
void testUser1() {
def user = new User( name: 'UniqueName' )
user.save(failOnError:true)
}
void testUser2() {
def user = new User( name: 'UniqueName' )
user.save(failOnError:true)
}
{code}
I've added testable code for Grails 1.3.2 and 1.2.0
Original Reporter: heiner73
Environment: Not Specified
Version: Grails-AuditLogging 0.5.4
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-47
Original Reporter: wenca
Environment: Not Specified
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-21
By default the stored length of the new and old value is only 255 and if I want to store any longer data it is not possible to configure it.
Just provide one config var that will be used by the truncate method of AuditLogInterceptor and by AuditLogEvent mapping. Thanks.
I get this exception at startup with grails 2.0.1 and audit-logging plugion 0.5.4.
Also reported under Grails issues at:
http://jira.grails.org/browse/GRAILS-8646.
Original Reporter: jagedn
Environment: Not Specified
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-23
Delete Event generate a new record into AuditLogEvent table with an irrelevant information because we can't retrieve the deleted object by the id.
It could be interesting put into oldvalue field the toString of the object.
Original Reporter: leonate
Environment: Not Specified
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-28
It is not possible to use AuditLogEvent class from a controller which resides in a non-default package.
As I understand the best practice is to use packages for plugin classes.
It would be good to place all audit-logging classes into some package.
Original Reporter: jmeam
Environment: Grails 1.3.2
Version: Grails-AuditLogging 0.5.3
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-8
When object's collection properties change (ie. in many-to-many relation). Hibernate return new collection in getOldState(). Thus make plugin does not know that the collection was changed and not log the change.
Solution was to get a snapshot.
http://stackoverflow.com/questions/812364
I've attached a modified AuditLogListener.groovy file (v 0.5.3) according to above post.
PS. the file include other modification to change java.util.Date to java.sql.Timestamp for consistency
Original Reporter: roos
Environment: Not Specified
Version: Grails-AuditLogging 0.5.4
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-43
config option to add ability to log the id of assotiated objects in form of
[objId]<object_toString()
Original Reporter: ashishj01
Environment: PreProduction
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-12
Domain class that has a collection of another domain object doesn not log correctly.
Let me try to explain the scenario :
* I have a class Group(in the domain folder) marked as auditable(set to true).
* The groups class hasMany accounts (i.e has a field as static hasMany =[accounts : Account])
* Account is another domain object and is auditable as well.
* Set up some dummy data for Group with name say, GroupA with 3 accounts added to the accounts collection, say Acnt1, Acnt2 and Acnt3.
* Now, change or update the Group class to remove accounts one by one, each in seperate transactions and oberserve the inconsitency in the audit logging.
* When Acnt3 is updated or removed, its is logged properly by the plugin
value of oldMap=[] newMap=[Acnt1, Acnt2]
* When Acnt2 is updated or removed, its is logged properly by the plugin
value of oldMap=[] newMap=[Acnt1]
* When Acnt1 is updated or removed, its is NOT logged properly by the plugin
In this case, the onChange call back in not invoked because, there is some piece of code in the plugin that tries to act smart and decides to do nothing if oldMap and newMap is same.
Firstly, why is the value of oldMap set to [] in all cases. Shouldnt the default behaviour have the values in the collection set in oldMap. Is there anything special I need to do in my code to set the oldMap to correct values?
This is a show stopper for us and needs to be addressed urgently. If you know the fix , can you send the details so that we can edit the plugin at our end and use it.
Original Reporter: cummingscs
Environment: Not Specified
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-11
Original Reporter: eceres
Environment: Not Specified
Version: Grails-AuditLogging 0.5.4
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-35
Currently each gorm object needs to have the auditable value set. Would be easier and more consistent to set a global default auditable state in Config.groovy that gets applied to all objects. This is helpful if you can not modify all gorm objects but want universal logging, have a lot of gorm objects to modify, or want to ensure future compliance. Each gorm object can over-ride the default behavior to change/turn it off the same as current configuration for audit logging.
The provided patch is consistent with the current behavior if Config.groovy does not get added defaults. Then modifying Config.groovy will allow setting the 4 main settings of audit logging via different parameters.
Example of new Config.groovy settings allowed from this patch:
auditLog {
auditableDefault = true
handlersOnlyDefault = true
ignoreDefault = ['version','lastUpdated','ignoreMe']
defaultHandlerClosure = { request, session, handler, entity, oldMap, newMap ->
print "Handler called for ${entity.class.toString()} object due to change of ${handler}"
}
}
auditableDefault - can be true or false. If false (standard behavior) will only log for classes with static auditable defined. If true then will log for any class that does not set static auditable = false.
handlersOnlyDefault - can be true or false. If false (standard behavior) will continue to log as normal. If true will not carry out the logging except on any class with static auditable = [handlersOnly:false]
ignoreDefault - takes a list that will be the default fields ignored. If not provided will be ['version', 'lastUpdated'] like the current version. Like other properties setting ignore: in the static auditable will use that over the default.
defaultHandlerClosure - A closure that will be called if the gorm object does not have the proper on method (onChange, onSave, onDelete). The closure takes 5 parameters as shown in above example. The handler value will be a string equal to the on method that was not provided.
Original Reporter: roos
Environment: Not Specified
Version: Grails-AuditLogging 1.0.0
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-50
With 1.0.0, we will be ORM implementation agnostic and will not depend on Hibernate anymore.
GrailsDomainClass currently does not support getting old value for collections as Hibernate supports with snapshots (which we used in the 0.5.x plugin versions).
We need to find a way to get the old value of collections.
Original Reporter: roos
Environment: Not Specified
Version: Grails-AuditLogging 0.5.4
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-41
Currently, the oldValue and newValue fields are set to default size (255).
Provide the ability to use long fields by config using:
auditLog.largeValueTableTypes = true
With largeValueTableTypes, auditLog.TRUNCATE_LENGTH can be set to a higher value.
Original Reporter: roos
Environment: Not Specified
Version: Grails-AuditLogging 0.5.4
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-44
Original Reporter: roos
Environment: Not Specified
Version: Grails-AuditLogging 0.5.4
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-40
When using DomainMixins, currently the plugin logs relations as "mixin.@xxx" due to bug http://jira.codehaus.org/browse/GROOVY-3236
To workaround this, the mixin developer can add the toString() method to the Mixin with this:
{code}
def toString(){
this as String
}
{code}
As Grails developers not always have access to all Domain Mixin classes, best would be to change AuditLogListener.truncate to:
{code}
String truncate(final obj, int max) {
log.trace "trimming object's string representation based on ${max} characters."
def str = "$obj".trim() // change due to GROOVY-3236
return (str?.length() > max) ? str?.substring(0, max) : str
}
{code}
Original Reporter: hartsock
Environment: Not Specified
Version: Grails-AuditLogging 0.5
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-17
Create a way for users to ask for old versions of objects. For example if we do something like this...
def per = new Person(name:'Fred',dob:firstBirthDay)
per.save()
per.dob = newBirthDay
per.save()
We want to say:
def originalPer = per.findByNameAndVersion('Fred',0)
and get the original object from the database.
Original Reporter: chillwabbitt
Environment: Not Specified
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-32
Hi
I would like to be able to add a new field to the logger domain object that I can set from either the OnSave, onDelete etc. of my applications domain class.
Even if this is not included, could you give me an example on how to achive this.
Many thanks
Lindsay
Original Reporter: [email protected]
Environment: Not Specified
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-38
In Grails 2.0.3, audible domain classes fail to be deleted, yet there is no error or stacktrace indicating that something went wrong. I am using audit logging plugin 0.5.4.
In my domain I have hasMany relation ship.Delete events got auditing in the AUDIT_LOG table but deletion of that object is failing with NPE.
Original Reporter: giancarlo.angulo
Environment: Not Specified
Version: Grails-Spring-Security-CAS 0.1
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-29
When using uuid as default generator of id:
static mapping = {
id generator:'uuid'
}
the audit logging plugin fails due to a type mismatch exception.
It would be nice if we could set id in grails plugin to use uuid by setting something in the grails config file.
I've a attached a file one of my co-worker did but it basically added a the line above and
String id
in the domain class of AuditLogEvent.
Original Reporter: mjhugo
Environment: PostgreSQL and Oracle
Version: Not Specified
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-14
Attached is a patch that provides a workaround for problems discussed on the Grails mailing list http://www.nabble.com/Audit-Logging-Plugin-Question-td17430121.html and http://www.nabble.com/how-do-I-encrypt-a-password—td17130128.html#a17170904 with the Audit Log plugin. The plugin successfully creates rows in the Audit Log table when using the in memory database, but fails silently with at least two ‘real’ databases (postgres and oracle).
Please note that this particular patch will only work with a postgres database. In particular, the SQL statement used in AuditLogListener.saveAuditLog() uses
1) select nextval (‘hibernate_sequence’) and
2) now()
which may or may not work depending on your database.
I don’t think this is the ideal solution, but it may help some people get past the initial issue until a more permanent solution is found.
Original Reporter: bogdand
Environment: Not Specified
Version: Grails-AuditLogging 0.5.4
Migrated From: http://jira.grails.org/browse/GPAUDITLOGGING-37
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.