![]() Import json from pymongo import MongoClient from logger_master.logger import MongoLogger # pushing log to mongodb instance mongo_uri = mongo_instance = MongoClient ( mongo_uri ) # basic usage for pushing log with specific database and collection logger = MongoLogger ( mongo_instance = mongo_instance, mongo_db = 'my_log', mongo_collection = 'my_log_collection' ) # pushing serialize log to. custom_func(function): function for custom serialized data.log_path(str): file path for storing log data. ![]() ![]() serialize(bool): data serialized or not.terminal_displayed(bool): display log information on terminal screen or not.mongo_collection(str): collection for storing log data.mongo_db(str): database for storing log data.mongo_instance(object): mongodb instance.Description:Ī package for pushing serialized error log which generated by loguru to remote storage (including mongodb / redis / fluentd). A package for pushing serialized error log which generated by loguru to remote storage.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |