Hello World Logger

chevron-rightPrerequisiteshashtag

Running Logger Example App

circle-info

All the code used in the following examples can be found in our GitHub repository bosa-example-apps/bosa-sdk-logging-example-apparrow-up-right.

git clone https://github.com/GDP-ADMIN/bosa-example-apps.git
cd bosa-sdk-logging-example-app

▶️ Execute the script for installing and start the dependencies

./start-dependencies.sh

🚀 Then run the app (there is two main file to run)

poetry run python bosa_sdk_logging_example_app/app_regex.py
poetry run python bosa_sdk_logging_example_app/app_ner_api.py

this the expected output

🔍 Generating regex patterns... 2025-05-15 14:38:29,125 - Logging with Regex PII - INFO - Logging sensitive information for processing: contoh nomor ktp 35******01 contoh email jo******om contoh nomor telepon +628******9819 dan 0812******9384. contoh npwp 01.***.***.34

The key indicators of success:

  • The data will masked in your console

this is the snippet example how to using this:

chevron-rightExample Codehashtag

Example how to use NER API for logger

You can use NER based API for logging. This method:

  • Uses machine learning to detect a wider range of PII.

  • Can identify context-dependent PII that regex might miss.

  • Requires network access to the NER API.

this is the snippet example how to using this:

chevron-rightExample Codehashtag

The key indicators of success:

  • The data will masked in your console

Last updated