feat(logging): Implement database logging with app_log table
- Created migration to set up app_log table for storing application logs. - Added AppLog entity and repository for ORM handling of logs. - Developed DbLogger service to persist logs of level WARNING and above to the database while maintaining existing logging behavior. - Implemented tests for admin log retrieval and DbLogger functionality to ensure proper logging behavior. - Enhanced logging context sanitization for better error tracking.
This commit is contained in:
graphify-out/cache/ast/v0.8.44/3970d300cb4b804fed477773b47b653edb7aa3754b8cefd0e3f7d31a49417e6f.json
Vendored
+1
File diff suppressed because one or more lines are too long
graphify-out/cache/ast/v0.8.44/467e207cc4ef518da9d34cbc907c3de3ffc355fcd67f30c3155fe38624853f8b.json
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_shared_logging_applogrepository_php", "label": "AppLogRepository.php", "file_type": "code", "source_file": "src/Shared/Logging/AppLogRepository.php", "source_location": "L1"}, {"id": "logging_applogrepository_applogrepository", "label": "AppLogRepository", "file_type": "code", "source_file": "src/Shared/Logging/AppLogRepository.php", "source_location": "L8"}, {"id": "serviceentityrepository", "label": "ServiceEntityRepository", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "logging_applogrepository_applogrepository_construct", "label": ".__construct()", "file_type": "code", "source_file": "src/Shared/Logging/AppLogRepository.php", "source_location": "L10"}, {"id": "managerregistry", "label": "ManagerRegistry", "file_type": "code", "source_file": "src/Shared/Logging/AppLogRepository.php", "source_location": "L10"}], "edges": [{"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_shared_logging_applogrepository_php", "target": "serviceentityrepository", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "src/Shared/Logging/AppLogRepository.php", "source_location": "L5", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_shared_logging_applogrepository_php", "target": "managerregistry", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "src/Shared/Logging/AppLogRepository.php", "source_location": "L6", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_shared_logging_applogrepository_php", "target": "logging_applogrepository_applogrepository", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/Shared/Logging/AppLogRepository.php", "source_location": "L8", "weight": 1.0}, {"source": "logging_applogrepository_applogrepository", "target": "serviceentityrepository", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "src/Shared/Logging/AppLogRepository.php", "source_location": "L8", "weight": 1.0}, {"source": "logging_applogrepository_applogrepository", "target": "logging_applogrepository_applogrepository_construct", "relation": "method", "confidence": "EXTRACTED", "source_file": "src/Shared/Logging/AppLogRepository.php", "source_location": "L10", "weight": 1.0}, {"source": "logging_applogrepository_applogrepository_construct", "target": "managerregistry", "relation": "references", "confidence": "EXTRACTED", "source_file": "src/Shared/Logging/AppLogRepository.php", "source_location": "L10", "weight": 1.0, "context": "parameter_type"}], "raw_calls": [{"caller_nid": "logging_applogrepository_applogrepository_construct", "callee": "parent", "is_member_call": false, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Shared/Logging/AppLogRepository.php", "source_location": "L10", "receiver": null}]}
|
||||
graphify-out/cache/ast/v0.8.44/48db5c733cc7e02a8a226fc4ed552cd5282c91d400dc72b32f3f122c127033bf.json
Vendored
+1
File diff suppressed because one or more lines are too long
graphify-out/cache/ast/v0.8.44/4d5328c774fe4619eb75f9de434173ae4a4b5ca53f7729383399b12c2a222805.json
Vendored
+1
File diff suppressed because one or more lines are too long
graphify-out/cache/ast/v0.8.44/5b3237552e7ae040e5a3b2a289e8fc0f0518a1df84553665ea214efd36c2321d.json
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_shared_logging_applog_php", "label": "AppLog.php", "file_type": "code", "source_file": "src/Shared/Logging/AppLog.php", "source_location": "L1"}, {"id": "logging_applog_applog", "label": "AppLog", "file_type": "code", "source_file": "src/Shared/Logging/AppLog.php", "source_location": "L8"}, {"id": "logging_applog_applog_construct", "label": ".__construct()", "file_type": "code", "source_file": "src/Shared/Logging/AppLog.php", "source_location": "L37"}, {"id": "logging_applog_applog_toarray", "label": ".toArray()", "file_type": "code", "source_file": "src/Shared/Logging/AppLog.php", "source_location": "L47"}], "edges": [{"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_shared_logging_applog_php", "target": "applogrepository", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "src/Shared/Logging/AppLog.php", "source_location": "L5", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_shared_logging_applog_php", "target": "mapping", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "src/Shared/Logging/AppLog.php", "source_location": "L6", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_shared_logging_applog_php", "target": "logging_applog_applog", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/Shared/Logging/AppLog.php", "source_location": "L8", "weight": 1.0}, {"source": "logging_applog_applog", "target": "logging_applog_applog_construct", "relation": "method", "confidence": "EXTRACTED", "source_file": "src/Shared/Logging/AppLog.php", "source_location": "L37", "weight": 1.0}, {"source": "logging_applog_applog", "target": "logging_applog_applog_toarray", "relation": "method", "confidence": "EXTRACTED", "source_file": "src/Shared/Logging/AppLog.php", "source_location": "L47", "weight": 1.0}], "raw_calls": [{"caller_nid": "logging_applog_applog_construct", "callee": "time", "is_member_call": false, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Shared/Logging/AppLog.php", "source_location": "L44", "receiver": null}]}
|
||||
graphify-out/cache/ast/v0.8.44/5c94ca6ec5ce79cd14d07da357d72b77bcaba0e1f311e187cd3c8eeb2ab4c46b.json
Vendored
+1
File diff suppressed because one or more lines are too long
graphify-out/cache/ast/v0.8.44/5f7ed3260ea0be9c83ebc1afec10ca24dd4d6118a7079299105fed545eadb817.json
Vendored
+1
File diff suppressed because one or more lines are too long
graphify-out/cache/ast/v0.8.44/6b0c84481084c4920b085db292f903c4d296f1bc05b91e906e5917ad517660f3.json
Vendored
+1
File diff suppressed because one or more lines are too long
graphify-out/cache/ast/v0.8.44/8e10ac183f88465faeecb560f4dfedb97a9faacf46758d37dae0a268df96d093.json
Vendored
+1
File diff suppressed because one or more lines are too long
graphify-out/cache/ast/v0.8.44/a8f899cc061053e5664833c2ebcbf1fe2613c8d5b150973bb95e621750267c61.json
Vendored
+1
File diff suppressed because one or more lines are too long
graphify-out/cache/ast/v0.8.44/c0e9b10f345c3d894d27267c90618903fab9693fd4be3542a755fbed3787fcba.json
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_hamed_pj_my_pj_clinic_pro_clinicpro_migrations_version20260629161536_php", "label": "Version20260629161536.php", "file_type": "code", "source_file": "migrations/Version20260629161536.php", "source_location": "L1"}, {"id": "migrations_version20260629161536_version20260629161536", "label": "Version20260629161536", "file_type": "code", "source_file": "migrations/Version20260629161536.php", "source_location": "L13"}, {"id": "abstractmigration", "label": "AbstractMigration", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "migrations_version20260629161536_version20260629161536_getdescription", "label": ".getDescription()", "file_type": "code", "source_file": "migrations/Version20260629161536.php", "source_location": "L15"}, {"id": "migrations_version20260629161536_version20260629161536_up", "label": ".up()", "file_type": "code", "source_file": "migrations/Version20260629161536.php", "source_location": "L20"}, {"id": "schema", "label": "Schema", "file_type": "code", "source_file": "migrations/Version20260629161536.php", "source_location": "L20"}, {"id": "migrations_version20260629161536_version20260629161536_down", "label": ".down()", "file_type": "code", "source_file": "migrations/Version20260629161536.php", "source_location": "L26"}], "edges": [{"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_migrations_version20260629161536_php", "target": "schema", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "migrations/Version20260629161536.php", "source_location": "L7", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_migrations_version20260629161536_php", "target": "abstractmigration", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "migrations/Version20260629161536.php", "source_location": "L8", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_migrations_version20260629161536_php", "target": "migrations_version20260629161536_version20260629161536", "relation": "contains", "confidence": "EXTRACTED", "source_file": "migrations/Version20260629161536.php", "source_location": "L13", "weight": 1.0}, {"source": "migrations_version20260629161536_version20260629161536", "target": "abstractmigration", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "migrations/Version20260629161536.php", "source_location": "L13", "weight": 1.0}, {"source": "migrations_version20260629161536_version20260629161536", "target": "migrations_version20260629161536_version20260629161536_getdescription", "relation": "method", "confidence": "EXTRACTED", "source_file": "migrations/Version20260629161536.php", "source_location": "L15", "weight": 1.0}, {"source": "migrations_version20260629161536_version20260629161536", "target": "migrations_version20260629161536_version20260629161536_up", "relation": "method", "confidence": "EXTRACTED", "source_file": "migrations/Version20260629161536.php", "source_location": "L20", "weight": 1.0}, {"source": "migrations_version20260629161536_version20260629161536_up", "target": "schema", "relation": "references", "confidence": "EXTRACTED", "source_file": "migrations/Version20260629161536.php", "source_location": "L20", "weight": 1.0, "context": "parameter_type"}, {"source": "migrations_version20260629161536_version20260629161536", "target": "migrations_version20260629161536_version20260629161536_down", "relation": "method", "confidence": "EXTRACTED", "source_file": "migrations/Version20260629161536.php", "source_location": "L26", "weight": 1.0}, {"source": "migrations_version20260629161536_version20260629161536_down", "target": "schema", "relation": "references", "confidence": "EXTRACTED", "source_file": "migrations/Version20260629161536.php", "source_location": "L26", "weight": 1.0, "context": "parameter_type"}], "raw_calls": [{"caller_nid": "migrations_version20260629161536_version20260629161536_up", "callee": "addSql", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/migrations/Version20260629161536.php", "source_location": "L23", "receiver": null}, {"caller_nid": "migrations_version20260629161536_version20260629161536_down", "callee": "addSql", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/migrations/Version20260629161536.php", "source_location": "L29", "receiver": null}]}
|
||||
graphify-out/cache/ast/v0.8.44/c9214091aa37726eb1cb7109234bd2a24ce6cd77674d50ec83fc188cad819a0c.json
Vendored
+1
File diff suppressed because one or more lines are too long
graphify-out/cache/ast/v0.8.44/d2a46876b0e6e0cc5cf9a88c3ea9067de7a0f64df5bc59099c215c14a123a305.json
Vendored
+1
File diff suppressed because one or more lines are too long
graphify-out/cache/ast/v0.8.44/e2910a9314c0a63d60a4d5df210a421d12149e64db2550cb58bf021bb84f19c7.json
Vendored
+1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user