Skip to content
Epurashu edited this page Oct 3, 2016 · 2 revisions

Features:

The Tail Log module supports a filter query parameter that can be used to only include log messages that come from a specific Java package, match a specific string, or view messages that contains a certain log level(INFO,WARNING,DEBUG,ERROR).

Use cases:

  • Create separate pages that only include certain log messages
  • Allow the user to select packages they want to display in the log and exclude others
  • Allow the user to filter the complete tail log

Syntax:

The filtering is done by sending a list of parameters via URL, the parameters are separated by &.

ex: http://alfrescoURL/admin-log-settings-tail?context=Alfresco&[List of parameters]

[List of parameters] => filter=JavaPackage1**&filter=JavaPackage2&**filter=JavaPackage3

NOTE: The filter query is an additive one (it is an "OR" query), meaning that extra care is needed in order to create the desired query.

Examples:

Few examples of how to use the tail log for message filtering:

NOTE: the complete URL to the alfresco Tail Log will be replaces by "http://alfrescoURL/tailLog?context=Alfresco"

  1. http://alfrescoURL/tailLog?context=Alfresco&filter=org.alfresco.repo - one of the basic examples of how powerful the Tail Log can be, is by viewing the logs from a specific Java Package.

  2. http://alfrescoURL/tailLog?context=Alfresco&filter=org.alfresco.repo.web&filter=org.alfresco.repo.admin - another simple example of a query that shows all the logs of the "org.alfresco.repo.web" and "org.alfresco.repo.admin" classes and their children.

  3. http://alfrescoURL/tailLog?context=Alfresco&filter=DEBUG&filter=WARN - a basic query that shows only the log levels that have the value from the filter.

  4. http://alfrescoURL/tailLog?context=Alfresco&filter=admin - a query that searches all the classes/packages that contain the string "admin" and shows the logs.

NOTE: If the filter is empty, all the logs are shown.

By combining the examples mentioned above, the required Tail Log filtering can be achieved.

Clone this wiki locally