Application logs


Introduction

In the Operations tab of the administration area, there are 3 tools that allow you to view applicationlogs and modify their levels directly. :

  • Live logs, to view server logs in real time,
  • Logs, to view application logs,
  • Log configuration, to modify log levels category by category.

Live news

This tool allows you to consult logs in real time.

View logs

The upper part of the screen lists the various log lines. When you select a log line, the details are displayed in the lower part of the screen:

Pause

You can pause the log display by clicking on the Pause button:

To restart log display, click on the Pause button again.

Delete logs

You can delete received messages by clicking on the delete button :

Change log level

Finally, you can change the minimum level of logs to be displayed using the buttons in the Level group:

 

The Inherit mode button allows a category to inherit the level of its parent.
The Force inheritance button forces all children of the current node to inherit the node's category.

Open the log configuration tool

You can open the log configuration tool from the Live Logs contextual tab, by clicking on the Log configuration button:

Newspapers

By default, an application Ametys publishes a daily log file. In the View screen, logs are grouped by type and then sorted by date. This order can be changed on the fly by clicking on the table columns.

The Log Viewer screen only takes into account files located in the folder $AMETYS _HOME/logs

Open

Pour voir le détail d'un journal, sélectionnez le dans la liste et cliquez sur le bouton Ouvrir. Le fichier est téléchargé sous forme textuelle (taille < 1Mo) ou zippé (taille > 1Mo) :

Download

To download one or more logs, select them from the list and click on the Download button. If several logs are selected, they will be in a zip file:

Delete

To delete one or more logs, select them from the list and click on the Delete button:

Deleting recent logs is not recommended. However, such action is still permitted.

Purge logs

Finally, you can delete logs older than 12 days to save disk space, by clicking on the Purge logs button:

 

Configuration

This screen lets you define logging levels for the various log categories. Modifications will take place in real time, but are non-persistent (they will no longer be taken into account after a restart of the application).

The log categories available depend on the configuration of your application's log4j.xml file.

If you wish to make persistent changes, you need to modify the log4j file directly.xml. Consult the log4j documentation if necessary.

The icons in the tree represent the levels associated with each logging category. A translucent icon is displayed for categories that have no level but inherit the level of their parent.

For example, the selected category "resolver" has the DEBUG level by inheritance, because its parent category "core " has been assigned the DEBUG level. On the other hand, the "input" category just above it has the ERROR level.

Once you have selected the category of your choice, the following management actions become available by clicking on the corresponding buttons:

  • Switch to DEBUG
  • Switch to INFO
  • Switch to WARNING
  • Switch to ERROR
  • Inherit mode: The selected category will then inherit the level of its parent.
  • Force inheritance: forces all children of the current node to inherit the node's category.

For example, to switch the entire application to the INFO logging level, simply :

  • Select root node
  • Perform the "Switch to INFO" action
  • Perform the "Force inheritance" action to ensure that subcategories whose level has previously been modified are assigned to the INFO level.

 

Back to top