Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-150

Undefining suffix on size-rotating-file-handler sets invalid value on suffix

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.0.0.Alpha10
    • None
    • Logging
    • None
    • Hide

      1. start out-of-box standalone and connect to CLI
      2. Add size handler

      ./subsystem=logging/size-rotating-file-handler=SIZE:add(file={relative-to="jboss.server.log.dir", path="size.log"}, suffix=HH, max-backup-index=2, rotate-size=1k)
      ./subsystem=logging/root-logger=ROOT:add-handler(name=SIZE)
      

      3. Reload a server once or twice to see that rotation works as expected

      [pkremens@dhcp-4-200 log]$ ll
      -rw-rw-r--. 1 pkremens pkremens   475 Oct  2 15:43 size.log
      -rw-rw-r--. 1 pkremens pkremens  1029 Oct  2 15:43 size.log15.1
      -rw-rw-r--. 1 pkremens pkremens  1067 Oct  2 15:43 size.log15.2
      

      4. Now undefine the suffix attribute and reload a server

      ./subsystem=logging/size-rotating-file-handler=SIZE:undefine-attribute(name=suffix)
      
      Show
      1. start out-of-box standalone and connect to CLI 2. Add size handler ./subsystem=logging/size-rotating-file-handler=SIZE:add(file={relative-to= "jboss.server.log.dir" , path= "size.log" }, suffix=HH, max-backup-index=2, rotate-size=1k) ./subsystem=logging/root-logger=ROOT:add-handler(name=SIZE) 3. Reload a server once or twice to see that rotation works as expected [pkremens@dhcp-4-200 log]$ ll -rw-rw-r--. 1 pkremens pkremens 475 Oct 2 15:43 size.log -rw-rw-r--. 1 pkremens pkremens 1029 Oct 2 15:43 size.log15.1 -rw-rw-r--. 1 pkremens pkremens 1067 Oct 2 15:43 size.log15.2 4. Now undefine the suffix attribute and reload a server ./subsystem=logging/size-rotating-file-handler=SIZE:undefine-attribute(name=suffix)

    Description

      When the suffix is undefined (undefine-attribute(name=suffix)) on a size-rotating-file-handler the value undefined gets written to the suffix which is invalid. The value needs to be set to null if undefined.

      Attachments

        Issue Links

          Activity

            People

              jperkins-rhn James Perkins
              jperkins-rhn James Perkins
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: