3 Replies Latest reply on Mar 7, 2014 1:24 PM by Tomaz Cerar

    Wildcard usage in cli command

    Markus Falk Newbie

      Hi,

       

      I have the question if it is possible to use wildcards for CLI commands? For example to update all formatter for a periodic-rotating-file-handler.

       

      The read-resource command works, but not the write-attribute command:

      /subsystem=logging/periodic-rotating-file-handler=*:write-attribute(name=formatter,value=%d %-5p [%c] (%t) %s%E%n)

      --> JBAS014749: Operation handler failed: JBAS014648: Cannot write to *

       

       

      I hope this is the correct forum and say thanks in advance for your help :-)

       

      Below I'll paste some more CLI commands.

       

      Cheers,

      Markus

       

       

       

       

       

       

       

      Here my try:

      [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=*:read-resource
      {
          "outcome" => "success",
          "result" => [{
              "address" => [
                  ("subsystem" => "logging"),
                  ("periodic-rotating-file-handler" => "FILE")
              ],
              "outcome" => "success",
              "result" => {
                  "append" => true,
                  "autoflush" => true,
                  "enabled" => true,
                  "encoding" => undefined,
                  "file" => {
                      "relative-to" => "jboss.server.log.dir",
                      "path" => "server.log"
                  },
                  "filter" => undefined,
                  "filter-spec" => undefined,
                  "formatter" => "%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n",
                  "level" => "ALL",
                  "name" => "FILE",
                  "named-formatter" => "PATTERN",
                  "suffix" => ".yyyy-MM-dd"
              }
          }]
      }

       

      [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=*:write-attribute(name=formatter,value=%d %-5p [%c] (%t) %s%E%n)
      {
          "outcome" => "failed",
          "failure-description" => "JBAS014749: Operation handler failed: JBAS014648: Cannot write to *",
          "rolled-back" => true
      }


      [standalone@localhost:9990 /] /subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=formatter,value=%d %-5p [%c] (%t) %s%E%n)
      {"outcome" => "success"}