Locating IAST AcuSensor logs
The IAST AcuSensors produce logs, which can help troubleshoot problems with the IAST sensors. Each IAST sensor has its own way of logging. This article provides more information about the log location for each IAST sensor and any related configuration options.
How to find IAST AcuSensor logs
.NET Framework for both Windows and Linux
- Locate the .NET IAST AcuSensor’s `settings.ini` file.
- For .NET Framework, the `settings.ini` file is located in the same folder as `injector.exe`, which by default is named .NET Framework inside the folder where you extracted the dotnet-acusensor.zip file. For example, in the screenshot below, we extracted the dotnet-acusensor.zip file inside C:\ProgramData\Acunetix\dotnet-acusensor.
- Uninstall the current sensor.
- Modify the settings.ini file. With administrative privileges and read/write permission, open the `settings.ini` file using a text editor.
- Amend the `log.path` to point to an existing folder.
- Save the changes made to the settings.ini file before closing the text editor.
- Install/inject the sensor again.
.Net Core for both Windows and Linux
- Locate the .NET IAST AcuSensor’s `settings.ini` file.
- For .Net Core, .Net6, and .NET8 (both Windows and Linux), the `settings.ini` file is located inside the folder where you extracted the `dotnet-acusensor.zip`. For example, we extracted the `dotnet-acusensor` inside C:\ProgramData\Acunetix\dotnet-acusensor.
- Once you have extracted the files, amend the `settings.ini` file. With administrative privileges and read/write permission, open the `settings.ini` file using a text editor.
- Amend the `log.path` to point to an existing folder.
- Save the changes made to the settings.ini file before closing the text editor.
- Restart the application/server/service for the changes to take effect.
Node.js log location
- In Node.js, logs are integrated with the application's output, appearing directly in the terminal alongside other application logs.
- By utilizing `npx node-acusensor app.js >> c:\temp\sensor.log`, you're able to designate the location for saving logs.
- Restart the application/server/service for the changes to take effect.
Java log location
- To enable debug logs, add this Java parameter to the command line or to the ‘JAVA_OPTS’ environment variable: Dacusensor.debug.log=ON
- The sensor will output logs with the server logs. Refer to your web server documentation to identify your server’s default log location.
- Restart the application/server/service for the changes to take effect.
PHP log location
The PHP Sensor records entries in the web application error logs, which are managed via the error log directive of the web server.
- Detailed instructions for configuring this functionality are provided in the documentation for each supported web server:
- Apache 2: Refer to https://httpd.apache.org/docs/2.4/mod/core.html#errorlog
- Nginx: Refer to https://docs.nginx.com/nginx/admin-guide/monitoring/logging/
- Restart the application/server/service for the changes to take effect.