3

Is there a means of recording all user actions in QGIS, in particular date/time of data access?

Most of our data is in Postgresql which is fine, I can run logging from there and QGIS is recorded there as the client application. What I'm stuck on is how to track access to flat files such as rasters.

2

I think your best bet here is a plugin, or some custom Python code that you can use for monitoring.

If you place a startup.py script in .qgis/python it will be imported when QGIS starts so you could do something like this in there:

import logging
import getpass
from qgis.core import QgsMapLayerRegistry

QgsMapLayerRegistry.layersAdded.connect(loglayers)

def loglayers(layers):
    for layer in layers:
        logging.debug('{} - {}'.format(layer.name(), getpass.getuser()) 
0

There's also file system level logging of access to network shares. If your network share is a Windows server, you can set up Audit object access (I've not tried this). For a *nix samba server, use vfs_objects=full_audit in the share definition in smb.conf.

Note that logging will incur a performance penalty.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.