/api/space/debuglog-management/categories

The following operations are supported on this resource:

  • GET - Get all debug log categories/packages
  • POST - Add a new category/package with a specified log level
GET /categories Version 1

This API retrieves all the categories (java packages) which currently have an associated log level in log4j.

Sample Usage

GET /categories


  • Sample Output XML:
    <categories uri="/api/space/debuglog-management/categories size="24" ">
       <category key="/api/space/debuglog-management/categories/net.juniper.provisioning"
        uri="/api/space/debuglog-management/categories/net.juniper.provisioning"
        href="/api/space/debuglog-management/categories/net.juniper.provisioning">
          <packageName>net.juniper.provisioning</ packageName>
          <priority>WARN</priority>
          <handler>net_juniper_provisioning</handler>
      </category>
    </categories>


  • Sample Output JSON:

    {
      "categories": {
         "@uri":"/api/space/debuglog-management/categories", "@size":"24",
         "category":[
           {
              "@key": "/api/space/debuglog-management/categories/net.juniper.provisioning",
              "@uri": "/api/space/debuglog-management/categories/net.juniper.provisioning",
              "@href": "/api/space/debuglog-management/categories/net.juniper.provisioning",
              "packageName": "net.juniper.provisioning",
              "priority":"WARN"
              "handler":"net_juniper_provisioning"
           }
          ]
      }

  • Access Control

    The following capabilities are required to access this API: DefaultRead

    POST /categories Version 1

    This API is used to add a new category/package to be logged at a specified log level.

    Note: If the category/package already exists, then, this API will be equivalent to the PUT API. In that case, it will simply update the log level for the category.

    This API will create a default log file handler. It will setup a handler for the specified category, which writes the log to the <handler-name>.log file in /var/log/jboss/server/server1 directory.
    For example: if the category name is "org.apache", the handler name will be "org_apache" and the log file will be "org_apache.log".

    .

    Sample Usage

    POST /categories


  • Sample Input XML:
    <category>
      <packageName>net.juniper.provisioning</packageName>
      <priority>INFO</priority>
    </category>

  • Sample Output XML:
    <category>
      <packageName>net.juniper.provisioning</packageName>
      <priority>INFO</priority>
    </category>

  • Sample Input JSON:

    {
      "category": [
          {
             "packageName": "net.juniper.provisioning",
             "priority":"INFO"
          }
      ]

  • Sample Output JSON:

    {
      "category": [
         {
           "packageName":"net.juniper.provisioning",
           "priority":"INFO"
         }
      ]

  • Access Control

    The following capabilities are required to access this API: ChangeDebugLogSetting