Since version 1.5 OpenPanel supports custom plugins, giving developers the ability to extend and enhance panel functionality even further.
By default, over 150 actions within OpenPanel are automatically recorded in each user’s activity log.
If you’d like to record additional actions from your own custom plugin, you can do so easily with the following code:
from modules.core.logger import log_user_action
from app import inject_data
current_username = inject_data().get('current_username')
log_action = f"performed custom action {name} from plugin X"
log_user_action(current_username, log_action)
This ensures that any custom events you define are seamlessly integrated into each user’s activity history.
The logger module will automatically check and log the timestamp, username and IP address, so you don't need to pass those in the log_action.
log format is:
<DATE_AND_TIME> <IP_ADDRESS> User <USERNAME> <ACTION>
example:
2025-10-31 15:57:35 82.117.216.242 User stefan removed dashboard from Favorites