vishalanandl177 / DRF-API-Logger

An API Logger for your Django Rest Framework project.
https://github.com/vishalanandl177/DRF-API-Logger
Apache License 2.0
308 stars 56 forks source link

Feature to write logs into a database other than the default one #17

Closed saurabh0719 closed 3 years ago

saurabh0719 commented 3 years ago

Hi!

Having gone through the documentation it is my understanding that logs are written into the default database described in the settings.py file.

Is it possible to add a feature to write the logs into some other database while using multiple databases? If not, can you suggest any alternative work-arounds for this?

saurabh0719 commented 3 years ago

insert_log_into_database.py file :

def _insert_into_data_base(self, bulk_item) -

Do correct me if I've misunderstood something.

vishalanandl177 commented 3 years ago

In the next version, there will be an option to change the default DB for DRF API Logger.

vishalanandl177 commented 3 years ago

A new version is released with the fixes. Please update to version 1.0.7 You can specify the database where to store DRF API Logs by setting DRF_API_LOGGER_DEFAULT_DATABASE variable in the settings.py file.

Please read the docs for more information.