log.debug(“Id:” + domain.id)
being domain.id a long value, I get the exception:
Exception Message: No signature of method: groovy.util.ConfigObject.debug() is applicable for argument types: (java.lang.String) values: [Id:9] Possible solutions: getAt(java.lang.String), dump(), get(java.lang.Object), get(java.lang.Object), get(java.lang.Object), merge(groovy.util.ConfigObject)
Is it required in grails to include only strings parameters in debug’s arguments?
Are you sure that
logis an instance of Log4J’sLoggerclass? The error message looks a lot like it’s an instance of a completely different class (groovy.util.ConfigObject) instead.Besides, as you can see from the error message, the methid is being called with just a string. The concatenation of the values (into a single string) has already happened by the time the method is invoked.