Module

@adminjs/logger

Type Definitions

object

# LoggerFeatureOptions

Feature configuration object
Properties:
Name Type Attributes Description
propertiesMapping LoggerPropertiesMapping <optional>

For the feature to work you must define a model using an ORM of your choice., In case you want to use different attribute names, you can use this, options to configure the mapping.

resourceName string <optional>

Log's resource name. Defaults to 'Log'.

userIdAttribute string <optional>

Usually a primary key which identifies the currently logged in user.

View Source adminjs-logger/src/logger.feature.ts, line 30

object

# LoggerPropertiesMapping

Mapping object for Log model
Properties:
Name Type Attributes Description
id string <optional>

Primary key of your Log model

recordId string <optional>

Field to store logged record's id

recordTitle string <optional>

Field to store logged record's title

difference string <optional>

Field to store changes between actions. This has to be a text type field, or JSON/JSONB for databases which support this type

user string <optional>

Field to store the id of the user who triggered the action

action string <optional>

Field to store the action's name

resource string <optional>

Field to store the resource's name

createdAt string <optional>

Timestamp field indicating when the log has been created

updatedAt string <optional>

Timestamp field indicating when the log has been updated

View Source adminjs-logger/src/log.action.ts, line 91