{"id":17294853,"url":"https://github.com/machinecyc/logging_extension","last_synced_at":"2025-03-26T19:44:08.683Z","repository":{"id":181580745,"uuid":"666772225","full_name":"machineCYC/logging_extension","owner":"machineCYC","description":null,"archived":false,"fork":false,"pushed_at":"2023-07-22T03:22:27.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T01:51:25.360Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/machineCYC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-15T14:24:03.000Z","updated_at":"2023-07-16T09:35:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"bcf87711-a776-47a6-8607-b681e1fdc1d2","html_url":"https://github.com/machineCYC/logging_extension","commit_stats":null,"previous_names":["machinecyc/logging_extension"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/machineCYC%2Flogging_extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/machineCYC%2Flogging_extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/machineCYC%2Flogging_extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/machineCYC%2Flogging_extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/machineCYC","download_url":"https://codeload.github.com/machineCYC/logging_extension/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245727637,"owners_count":20662553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T11:08:16.982Z","updated_at":"2025-03-26T19:44:08.648Z","avatar_url":"https://github.com/machineCYC.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# logging_extension\n\nDevelop the customer logging to support sending the log to the database through web API\n\n    - api folder is the code base for the api service\n    - cus_logging is the code base for the customer logging\n\nOur target is doing the coustomer log when logging some information\n\nIn this case is show the log in the console and send the log to an api service at the same time\n\nThe python logging module has four main components\n\n    - Loggers: log collector\n    - Handlers: decide the distination of the log\n    - Formatters: format the log\n    - Filters: filter out some log\n\nbase on the definetion of the logging components, we can customize the handler, use the handler to send the request to api service\n\n## setup the python env\n    - poetry install\n\n## run the code\n    - run the api service\n        - cd api/\n        - uvicorn main:app --reload\n    - run the logging example\n        - python example.py\n\n## Reference\n\n- [Writing Custom Log Handlers In Python](https://dev.to/salemzii/writing-custom-log-handlers-in-python-58bi)\n\n- [Python Logging Tutorial: How-To, Basic Examples \u0026 Best Practices](https://sematext.com/blog/python-logging/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmachinecyc%2Flogging_extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmachinecyc%2Flogging_extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmachinecyc%2Flogging_extension/lists"}