Audit Log empty

I am firstly not sure if there is a log available for my request but I have a hunch that it’s the audit log. We want to view which files are downloaded / uploaded by the NextCloud client. We’re running NextCloud 15.

From the command line I have enabled the audit log and also changed the audit log location to write audit logs to audit.log - There is however nothing written to it, even when I deliberately log out / log in / setup a new connection from a client.

Any ideas as to what I may be doing wrong?

Afaik, make sure that the admin_audit app is installed.

I have enabled the command via command line:

sudo -u apache php occ app:enable admin_audit
admin_audit enabled

And also changed the audit log location:

sudo -u apache php occ config:app:set admin_audit logfile --value=/var/log/ncaudit.log
Config value logfile for app admin_audit set to /var/log/ncaudit.log

Yet, no new file is created in the /var/log directory even after I created a new file as a user. I am using version 15 for reference - What else can I check / do?

I also changed the file location to a directory within the nextcloud installation (so that apache has the neccesary access to the file) - It has now created the ncaudit.log file but it’s not populating anything in it (even with apache:apache as the owner of the file).

I added and deleted new files in my local nextcloud directory (and the files have synced to remote) but nothing is written to the audit log

I have even gone as far as to log out of the local client and attempted to log in with an incorrect password and again nothing is written to the audit log - I must be doing something wrong?

Alright I managed to get this working, you have to set the loglevel in the config file to 1

1 Like

Hello friend! I am having the same problem, no audit log is showed in the web browser’s log reader, but all other logs such as core are all there. Could you explain more on how you figure it out? What is your detailed configuration settings? I tried the level setting in the pho file but did not fix anything?!