Search

Logging in Totara allows you to collect details of interactions on the system, such as when a user logs in or accesses a course. There are three core types of log stores (where the data collected during logging will be saved) which are: Standard logLegacy log, and External database log.

Core log stores

By default the Standard log will be enabled, and this should work well in most cases. The Legacy logs should be left as disabled unless you have custom logs from an older version of Totara which you still wish to use. Finally, the External database log can be enabled if you wish to connect your Totara site up to an outside log store. To enable or disable any of these (as a Site administrator) you will need to go to Plugins > Logging > Manage log stores under the Administration menu. You will also be able to access the settings for any enabled log stores. 

Standard log and Legacy log both allow you to configure whether you wish to Log guest access (i.e include interactions between guest and the system in your logs) as well as how long you want to Keep logs for. It is recommend that you keep logs for as long as possible (in case you need them and to allow better reporting), however, you may wish to delete logs after an appropriate period to help with your site's performance.

With External database log settings you can configure the desired external log store before selecting which levels and types of actions you wish to be logged. Types of actions are: create, read, update, and delete. The available education levels of actions being: teaching, participating, and other. 

Using xAPI with Totara

It is possible to add plugins to Totara so that you can use any xAPI/ Tin Can compliant content you have in a course. This content could be available via an URL or as a package in a zip file, it can then be both integrated into the course and have any actions taken in the activity recorded in an external Learning Record Store (LRS). To achieve this you would also need to add a logstore plugin to Totara that works with an external LRS. Below we will explore how to do both of these things. 

Logstore plugin

To set up xAPI with Totara you will need a Totara Site and a LRS (Learning Record Store), this is a standalone application which can either be installed locally (for example using the open source tool Learning Locker) or you can pay for one (if you're not comfortable setting this up yourself). Additionally, you will also need two plugins: the Logstore xAPI (Moodle plugin) and the xAPI Launch Link  (Moodle plugin).

There are two parts of this setup, the Logstore plugin and then the Launch Link plugin. 

First, you will need to configure the Logstore xAPI plugin as this can transfers events in your LRS. This can only happen once you have installed the plugin onto your Totara Learn site (guidance on plugin installation can be found within the plugin). 

  1. Configure your chosen LRS, you should be able to find guidance on this from your chosen provider.
  2. You will need to set up a Client within your LRS, again instructions on this should be available from your LRS provider. You may have a client supplied for you when you create the LRS or you might need to create one.
  3. Within your Totara Learn site follow the path Site admin > Plugins >Logging > Manage Logstores.
  4. Configure this for your LRS using the Client details from step 2.
  5. Finally, click the Save changes button.

Tin Can Launcher

You have now configured the Logstore xAPI plugin. If you start performing actions in your Totara site (such as setting up courses and logging in or out), then go into your LRS you'll notice the statements of events will be transferred into your logstore. In the documentation for the Logstore xAPI plugin, you will find a list of all the supported events that will be transferred. 

The second stage is to configure the xAPI Launch Link plugin; this will let you launch compatible xAPI learning from Totara. The steps below take place after the xAPI Launch Link plugin has been installed; instructions on how to do this can be found within the plugin. 

  1. To configure the plugin go to Site admin > Plugins > activity modules > Tin can launch link.
  2. Add the Client information (as in Logstore configuration above).
  3. Click the Save changes button. 

You can then go to a course and follow these steps:

  1. On the course Turn editing on.
  2. Next, click Add an activity and select Tin Can Launch Link.
  3. Fill in the details as required (mandatory fields marked with an asterisk).
  4. Click the Save changes button.

Now you can go to the course and launch the Tin Can/ xAPI content you have linked via a package or URL. The details of events carried out in the content (such as launching, attempts made, and completion) will be transferred to your LRS. 


It is highly recommended that you use HTTPS for secure transfer of information when using logstore.

In config

It is possible to allow NGINX and other webservers to log username in access logs. When you allow logging by a webserver in the access logs they can send the username as a custom header which can be logged and stripped out if needed.

To configure this just add the variable $CFG->headerloguser to the config.php file. You can read more about this and possible values in config-dist.php.

On this page



Still have questions? Why not post them in the forums of the Totara Community?


  • No labels