/api/space/debuglog-management/categories
The following operations are supported on this resource:
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
- Accept Headers:
application/vnd.net.juniper.space.debuglog-management.categories+xml;version=1
application/vnd.net.juniper.space.debuglog-management.categories+json;version=1
<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>
{
"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: LogLevelConfiguration
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
- Content-Type Headers:
application/vnd.net.juniper.space.debuglog-management.category+xml;version=1;charset=UTF-8
application/vnd.net.juniper.space.debuglog-management.category+json;version=1;charset=UTF-8 - Accept Headers:
application/vnd.net.juniper.space.debuglog-management.category+xml;version=1
application/vnd.net.juniper.space.debuglog-management.category+json;version=1
<category>
<packageName>net.juniper.provisioning</packageName>
<priority>INFO</priority>
</category>
<category>
<packageName>net.juniper.provisioning</packageName>
<priority>INFO</priority>
</category>
{
"category":
{
"packageName":
"net.juniper.provisioning",
"priority":"INFO"
}
}
{
"category":
{
"packageName":"net.juniper.provisioning",
"priority":"INFO"
}
}
Access Control
The following capabilities are required to access this API: LogLevelConfiguration