Audit logs
As a SaaS company, your customers want to know how their users interact with their product.
This means you need to provide logging capabilities so that your SaaS customers can see what their users are doing in their software.
Building logging capabilities for SaaS customers is a hassle. The sheer size and complexity of actions to track, plus the precision you need to keep everything organized, accurate and updated, make it a challenging feature to build and maintain.
If compromised or incorrectly configured, they are useless.
Frontegg solves this problem for you.
Our fully-scalable multi-tenant audit log solution gets you closer to full-product maturity in no time at all.
The logs are tracking certain default events as soon as you implement Frontegg into your application.
It is customizable, secure, and provides comprehensive visibility into how users interact with customer applications.
Have peace of mind and stay focused on your core business knowing that your application is reliably logging user actions.
Get started now with Frontegg Audit Logs.
Watch this video to see Frontegg audit logs in action.
Audit logging is one of the enterprise features in our core set of user-management tools.
Frontegg events are automatically being logged from the moment you integrate Frontegg into your application.
To get more out of your audit logs, consider:
STEP 1: Enable Audit Logs
Although Frontegg automatically logs Frontegg events, you need to enable Audit Logs in the Builder to work with them in the Admin Portal.
Go to Home ➜ Builder Experience ➜ Admin Portal ➜ Workspace.
Find the Audit Logs switch and toggle to on.

You now should see the Audit logs in the Admin Portal.

Audit Logs Permissions
Ensure that a user can access Audit Logs in the Admin Portal by assigning them a role with Audit Logs permissions.
To access the Admin Portal, review the Admin Portal introductory guide.
STEP 2: Configure Data Structure
Configure the data structure for displaying and downloading audit log data.
Go to Home ➜ Builder ➜ Experience ➜ Admin Portal ➜Workspace and click the gear (⚙️) next to Audit Logs.
In the left panel, the settings appear and is where you select the data structure for displaying and downloading data.
Toggle on and off the features based on your preferences.
Whichever data is toggled on is the data displayed and available for download in the Admin Portal.

Add Custom Logging
After you enable audit logging in the Builder, customize what you log by adding your own events.
For instance, you can log events that are specific to your application, like if a user uploads a photo, upgrades a subscription, or pretty much anything.
You just need to add some code to your application from Frontegg's backend SDK and add the event to your data structure.
Here is the code.
import { AuditsClient } from '@frontegg/client'
// Init the audits SDK with the clientId and api key
const auditsClient = new AuditsClient();
await auditsClient.init('YOUR-CLIENT-ID', 'YOUR-API-KEY');
// Send the actual audit JSON (Match the model below to the one defined on the portal)
await auditsClient.sendAudit({
tenantId: 'THE-TENANT-ID',
user: '[email protected]',
resource: 'Portal',
action: 'Login',
severity: 'Info',
ip: '68.132.6.137'
});
from frontegg import FronteggClient
# Init the audits SDK with the clientId and api key
client = FronteggClient("your-client-id", "your-api-key")
# Send the actual audit JSON (Match the model below to the one defined on the portal)
client.send_audits(
{
user: "[email protected]",
resource: "Portal",
action: "Login",
severity: "Info",
ip: "68.132.6.137",
},
tenantId="THE-TENANT-ID",
)
You are now pushing data using THE-TENANT-ID to the logs.
Update Data Structure
Add the new event as a field in the data structure.
Go to Home ➜ Builder ➜ Experience ➜ Admin Portal ➜Workspace and click the gear (⚙️) next to Audit Logs.
Click the plus (+) button.

Complete the form.

After saving, click back and make sure the new event is toggled on in the left panel Audit Log settings.
You should see the new field as a column in your table.
Export Log Data
You can export the log data to use however you want.
Go to Admin Portal ➜ Audit Logs and click the download button.

To access Audit Logs in the Admin Portal, review the Admin Portal introductory guide to gain access to the Admin Portal and enable Audit Logs in the Builder.
Configure audit log data structure before downloading or just go with the default data structure.
Automatic Logging
Frontegg comes with automatic audit logging from the moment you integrate it into your application.
We automatically log events that happen when your customers use our product.
For instance, we automatically log user-management events, like when a user logs in or modifies their settings.
Plus, we log performance and maintenance events related to Frontegg's tools, like if a lag is detected or a security audit is performed.
Aside from integrating Frontegg, you do not need to do anything to start the automatic logging process.
To work with the logs, follow the instructions above.
Updated 3 months ago