Indyco Explorer integrates an Audit logging system designed to monitor the core actions performed within the system.

The audit logs capture a detailed record of actions, enriched with additional user-related information to offer insights into who did what and when.


The list of actions that are recorded includes:

  • Login
  • User creation
  • User password changes
  • User updates
  • User deletion
  • Group creations
  • Group updates
  • Group deletion
  • LDAP configuration update
  • Project version publication
  • Project version deletion
  • Project version promotion


This is an example of what you can expect from the audit logs:

[02/27/2024 15:59:53] [Information] [10.10.10.10] [Anonymous] [Audit] Login.Indyco: User logged in admin:6582aeac7b797339150cb601 
[02/27/2024 16:27:32] [Information] [10.10.10.10] [admin] [Audit] Project.Version.Published projectId:65d43f06-1dfd-46c8-b1d8-c29f0ffbdd79 versionId:021d402e-62d9-48b6-be18-64eebb5f7ad8 
[02/27/2024 16:27:33] [Information] [10.10.10.10] [admin] [Audit] Project.Version.Promoted projectId:65d43f06-1dfd-46c8-b1d8-c29f0ffbdd79 versionId:021d402e-62d9-48b6-be18-64eebb5f7ad8 
[02/27/2024 16:27:37] [Information] [10.10.10.10] [Anonymous] [Audit] Login.Indyco: User logged in admin:6582aeac7b797339150cb601 


Configuration via appsettings

To enable audit logs via the appsettings configuration file you need to add the following snippet inside the file appsettings.Production.json right after the Indyco configuration section:

  "Serilog":{
    "WriteTo":{
      "Audit":{
        "Name":"Logger",
        "Args":{
          "configureLogger":{
            "WriteTo":[
              {
                "Name":"File",
                "Args":{
                  "path":"App_Data/logs/audit-.log",
                  "RollingInterval":"Day",
                  "fileSizeLimitBytes":1000000,
                  "rollOnFileSizeLimit":true,
                  "retainedFileCountLimit":30,
                  "shared":true,
                  "OutputTemplate":"[{Timestamp:G}] [{Level}] [{ClientIp}] [{UserId}] [{SourceContext}] {Message:lj} {Exception}{NewLine}"
                }
              }
            ],
            "Filter":[
              {
                "Name":"ByIncludingOnly",
                "Args":{
                  "expression":"StartsWith(SourceContext, 'Audit')"
                }
              }
            ],
            "Enrich":[
              "WithClientIp"
            ]
          }
        }
      }
    }
  }

Remember that the file needs to be e valid JSON, so be sure to check for any missing commas.


Configuration via environment variables (docker)

To enable audit logs via the environment variables you need to pass the same configuration illustrated above but converting it to variables as described in the official .NET documentation.

Here's an example of the same configuration above made with environment variables:

Serilog__WriteTo__Audit__Name = Logger
Serilog__WriteTo__Audit__Args__configureLogger__WriteTo__File__Name = File
Serilog__WriteTo__Audit__Args__configureLogger__WriteTo__File__Args__path = App_Data/logs/audit-.log
Serilog__WriteTo__Audit__Args__configureLogger__WriteTo__File__Args__RollingInterval = Day
Serilog__WriteTo__Audit__Args__configureLogger__WriteTo__File__Args__fileSizeLimitBytes = 1000000
Serilog__WriteTo__Audit__Args__configureLogger__WriteTo__File__Args__rollOnFileSizeLimit = true
Serilog__WriteTo__Audit__Args__configureLogger__WriteTo__File__Args__retainedFileCountLimit = 30
Serilog__WriteTo__Audit__Args__configureLogger__WriteTo__File__Args__shared = true
Serilog__WriteTo__Audit__Args__configureLogger__WriteTo__File__Args__OutputTemplate = [{Timestamp:G}] [{Level}] [{ClientIp}] [{UserId}] [{SourceContext}] {Message:lj} {Exception}{NewLine}
Serilog__WriteTo__Audit__Args__configureLogger__Filter__0__Name = ByIncludingOnly
Serilog__WriteTo__Audit__Args__configureLogger__Filter__0__Args__expression = StartsWith(SourceContext, 'Audit')
Serilog__WriteTo__Audit__Args__configureLogger__Enrich__0 = WithClientIp


Further customization

The main parameters that you can customize are:

paththe path, relative to the application root folder, where the logs will be saved
RollingIntervalthe interval used for rolling the logs. Can be set as: "Minute", "Hour", "Day", "Month", "Year", "Infinite" 
fileSizeLimitBytes
The approximate maximum size, in bytes, to which a log file will be allowed to grow
rollOnFileSizeLimit
If true, a new file will be created when the file size limit is reached
outputTemplate
A message template describing the format used to write to the sink. You can disable ip logging by removing the {ClientIP} section of the message (read more)