Skip to content

Logging

Access logs

The FaceAPI Access logs are a gunicorn server Access log file. To enable FaceAPI Access logs, set the ENV variable FACEAPI_LOGS_ACCESS_FILE to true. You may customize the access log file location via FACEAPI_LOGS_ACCESS_FILE_PATH ENV variable.

To get access to the Access log file from the host machine, it is required to:

  1. Create a folder for logs and ensure the group is root and group members have write & 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_x64/cpu/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, set the ENV variable FACEAPI_LOGS_APP_FILE to true. You may customize the access log file location via the FACEAPI_LOGS_APP_FILE_PATH ENV variable.

To get access to the Application log file from the host machine, it is required to:

  1. Create a folder for logs and ensure the group is root and group members have write & 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_x64/cpu/regula.license -v ~/faceapi-logs:/app/logs -e FACEAPI_LOGS_APP_FILE=true regulaforensics/face-api
    

Processed results logs

The FaceAPI Processed results logs are the artifacts of the processed request. To enable the FaceAPI application logs, set the ENV variable FACEAPI_PROCESS_RESULTS_LOG_PATH. To get access to the application generated logs from the host machine, it is required to:

  1. Create a folder for logs and ensure the group is root and group members have write & 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_x64/cpu/regula.license -v ~/faceapi-logs:/app/logs -e FACEAPI_PROCESS_RESULTS_LOG_PATH=/app/logs 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 '....'