Skip to content

Logging

Access Logs

The FaceAPI access logs are a gunicorn server access log file. To enable FaceAPI access logs and set path, use the webServer.logging.access parameter.

To get access to the access log file from the host machine, do the following:

  1. Create a folder for logs and ensure the group is root and group members have the write and execute permissions over the created folder:

    mkdir ~/faceapi-logs
    chmod g+wx ~/faceapi-logs
    sudo chgrp root ~/faceapi-logs
    
  2. Mount the host folder to the application log folder inside the container:

    docker run -p host_port:41101 -v host_path_to_license_folder/regula.license:/app/extBin/unix/regula.license -v ~/faceapi-logs:/app/logs -e FACEAPI_LOGS_ACCESS_FILE=true regulaforensics/face-api
    

Application Logs

The FaceAPI application logs are a gunicorn server application log file. To enable the FaceAPI application logs, use the webServer.logging.app parameter.

To get access to the Application log file from the host machine, do the following:

  1. Create a folder for logs and ensure the group is root and group members have the write and execute permissions over the created folder:

    mkdir ~/faceapi-logs
    chmod g+wx ~/faceapi-logs
    sudo chgrp root ~/faceapi-logs
    
  2. Mount the host folder to the application log folder inside the container:

    docker run -p host_port:41101 -v host_path_to_license_folder/regula.license:/app/extBin/unix/regula.license -v ~/faceapi-logs:/app/logs -e FACEAPI_LOGS_APP_FILE=true regulaforensics/face-api
    

Processing Result Logs

The FaceAPI processing result logs are the artifacts of the processed request. Processing result logs store the processing input and results in JSON format. The location for the processing result logs is set separately for the modules, see the location parameter at detectMatch, liveness, and search.

To get access to the processing results logs from the host machine, do the following:

  1. Create a folder for logs and ensure the group is root and group members have the write and execute permissions over the created folder:

    mkdir ~/faceapi-logs
    chmod g+wx ~/faceapi-logs
    sudo chgrp root ~/faceapi-logs
    
  2. Mount the host folder to the application log folder inside the container:

    docker run -p host_port:41101 -v host_path_to_license_folder/regula.license:/app/extBin/unix/regula.license -v ~/faceapi-logs:/app/logs -e FACEAPI_STORAGE_LOGS_DESTINATION=fs regulaforensics/face-api
    

Request header and logging

You can use an X-RequestID request header with requests related to the same context. This header value will be included to the log file for all the labeled requests.

For example:

curl --location --request POST '{url}/api/search' \
--header 'Content-Type: application/json' \
--header 'X-RequestId: b45ef1ac-97d1-11ed-b910-53b189c5e8b8' \
--data-raw '....'