Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(logging configuration) Expand the admin_audit section #10604

Merged
merged 1 commit into from
Jun 12, 2023

Conversation

joshtrichards
Copy link
Member

@joshtrichards joshtrichards commented Jun 11, 2023

  • Enhances logging overview
  • Reorders admin_audit app section to be more logical/readable
  • Expands audit logging explanations
  • Adds audit logging web interface integration config.php example that works with built-in logreader app

Possibly future follow-up areas (outside the scope of this PR):

  • simple log rotation config example
  • direct links to existing config.php parameters Logging section in manual
  • direct links to existing occ section in manual
  • explanation for log level filtering (versus configuration) available in the built-in logreader app via Administration settings->Logging

☑️ Resolves

🖼️ Screenshots

logging overview:

image

admin_audit section:

image

Use your Nextcloud log to review system status, or to help debug problems. You may adjust logging levels, and choose between using the Nextcloud log or your syslog. If additional audit information is required, you can optionally activate the **admin_audit** app, which by default generates a separate audit.log file in the data directory.
Use your Nextcloud log to review system status, or to help debug problems. You may adjust logging levels, and choose how and where log data is stored. If additional event logging is required, you can optionally activate the **admin_audit** app.

When ``file`` based logging is utilized, both the Nextcloud log and, optionally, the **admit_audit** app log can be viewed within the Nextcloud interface under *Administration settings -> Logging* (this functionality is provided by the **logreader** app).
Copy link
Contributor

@szaimen szaimen Jun 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can? I thought this is a missung feature...

Copy link
Member Author

@joshtrichards joshtrichards Jun 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me too . I got sick of people asking and not knowing the answer. It had been on my to-do list for awhile so finally got around to digging into the code and testing earlier today. So, yes, it does exist as-is today in a form that is totally reasonable for many use cases.

Integrating into the Web Interface
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The built-in NC ``logreader`` app (which is what provides the *Administration settings->Logging* interface) only accesses the file-based ``nextcloud.log``. The **admin_audit** app log output, however, can be integrated into the web interface by configuring it to *also* log to the ``nextcloud.log``.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see. Better would be something like nextcloud/logreader#857 though

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That PR looks quite useful if one doesn't wish to combine their on-disk audit log with the normal Nextcloud log.

The confusing thing has been that screenshot from the logreader app repository README - (it's referenced in nextcloud/logreader#129 and occasionally on the forum). It shows everything merged together. :-)

So it turns out it's totally been possible all along.

@szaimen szaimen added this to the Nextcloud 28 milestone Jun 11, 2023
Copy link
Contributor

@szaimen szaimen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM then

@szaimen szaimen merged commit d352db3 into nextcloud:master Jun 12, 2023
8 checks passed
@szaimen
Copy link
Contributor

szaimen commented Jun 12, 2023

/backport to stable27

@szaimen
Copy link
Contributor

szaimen commented Jun 12, 2023

/backport to stable26

@szaimen
Copy link
Contributor

szaimen commented Jun 12, 2023

/backport to stable25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Audit log file fed but not displayed through the admin web interface audit log is not shown
2 participants