Uploaded image for project: 'Hibernate ORM'
  1. HHH-11319

The dirtyPropertyNames content is NOT logged properly

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects versions: 5.2.5
    • Fix versions: 5.2.6
    • Components: hibernate-core
    • Labels:
    • Environment:
      All hibernate versions, database independent.

      Description

      While tracing the dirty checking with SLF4J+logback to find the dirty property names and got a log entry like below

      org.hibernate.event.internal.DefaultFlushEntityEventListener - Found dirty properties    [[packagename.entityclass#9742239717]] : [Ljava.lang.String;@68abb468
      

      Which the contents of dirtyPropertyNames are NOT printed, but the type and object id.
      The log statement needs to use Arrays.toString to print the contents of dirtyPropertyNames.

      //original code from org.hibernate.event.internal.DefaultFlushEntityEventListener in hibernate-core
          LOG.tracev(
      		"Found dirty properties [{0}] : {1}",
      		MessageHelper.infoString( persister.getEntityName(), id ),
      		dirtyPropertyNames
                      //recommend to use Arrays.toString(dirtyPropertyNames)
          );
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 5m
                5m
                Remaining:
                Remaining Estimate - 5m
                5m
                Logged:
                Time Spent - Not Specified
                Not Specified