Skip to content

Login & Operation Logs

Together the two logs answer the three audit questions: who logged in, who changed what, and did it break. Both are read-only lists with search and export. The delete button appears only for super admins.

Login Log

One record per successful login:

FieldDescription
Account / Login Time
IP Address / IP SourceResolved to "Country | Province | City | ISP"
OS / Browser / Device TypeParsed from the User-Agent

IP geolocation uses the bundled offline ip2region database, on by default with no network access. Point erupt.upms.ip2region.path at a newer xdb file, or set enable: false to skip lookups.

Operation Log

Records every data write by a user, plus any API annotated with @EruptRecordOperate:

FieldDescription
Operator / IP / IP Source
Function NameSuch as UPDATE | Order Management: operation type, then menu name
Before DataFor edits and deletes, the full object before the change, pretty-printed JSON
Req ParamThe request body or URL parameters submitted
Is Success / Error InfoOn failure the stack trace is saved (truncated to 4000 characters)
Req TimeMilliseconds, sortable, for spotting slow operations
URL / Method

Operation types recorded by default:

TypeTrigger
INSERTAdding data
UPDATEEditing, inline cell edits, batch edits
DELETEDeleting data
FORM-VIEWForm view submissions
Row operationCustom @RowOperation actions, named by their title

Recording Your Own APIs

Add @EruptRecordOperate to a REST endpoint and it lands in the operation log:

java
@PostMapping("/sync-order")
@EruptMenuAuth("order_sync")
@EruptRecordOperate("Sync orders")
public R<Void> syncOrder(@RequestBody SyncBody body) { ... }

Configuration

yaml
erupt:
  security:
    record-operate-log: true              # false disables recording
    record-operate-log-max-body-size: 1048576  # bodies over 1MB are not buffered

As an Analytics Source

EruptLoginLog and EruptOperateLog both carry @EruptCube, with account, IP region, function name and duration already declared as dimensions and measures. With erupt-cube you can drag-and-drop straight away: which function fails most, when logins peak, which operations are slowest.

Contributors

The avatar of contributor named as YuePeng YuePeng
The avatar of contributor named as Claude Opus 5 (1M context) Claude Opus 5 (1M context)

Changelog

Released under the Apache-2.0 License.