{"id":18771573,"url":"https://github.com/anicetkeric/log4j_sample","last_synced_at":"2025-08-02T15:09:42.150Z","repository":{"id":114565514,"uuid":"93443961","full_name":"anicetkeric/log4j_sample","owner":"anicetkeric","description":"Apache Log4j2 with Spring Boot","archived":false,"fork":false,"pushed_at":"2017-06-18T22:17:08.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-21T01:13:22.152Z","etag":null,"topics":["log4j2","log4j2-appender","logging"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/anicetkeric.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":"2017-06-05T20:29:44.000Z","updated_at":"2017-06-08T16:12:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"77a19a2d-73dc-412c-9751-44712375f07e","html_url":"https://github.com/anicetkeric/log4j_sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anicetkeric/log4j_sample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anicetkeric%2Flog4j_sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anicetkeric%2Flog4j_sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anicetkeric%2Flog4j_sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anicetkeric%2Flog4j_sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anicetkeric","download_url":"https://codeload.github.com/anicetkeric/log4j_sample/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anicetkeric%2Flog4j_sample/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268408199,"owners_count":24245577,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["log4j2","log4j2-appender","logging"],"created_at":"2024-11-07T19:25:22.950Z","updated_at":"2025-08-02T15:09:42.124Z","avatar_url":"https://github.com/anicetkeric.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# log4j_sample\n Apache Log4j2 with Spring Boot\n \n # Apache Log4j 2\nApache Log4j 2 est une mise à niveau vers Log4j qui fournit des améliorations significatives par rapport à son prédécesseur, Log4j 1.x, et fournit plusieurs améliorations disponibles dans Logback tout en réparant certains problèmes inhérents à l'architecture de Logback. [ Read more ](https://logging.apache.org/log4j/2.0/index.html).\n  \n # Log4J 2 Spring Boot Dependencies\n\n Exclude logback from default log dependency of Spring Boot\n```xml\n\u003cdependency\u003e\n\t\u003cgroupId\u003eorg.springframework.boot\u003c/groupId\u003e\n\t\u003cartifactId\u003espring-boot-starter\u003c/artifactId\u003e\n\t\u003cexclusions\u003e\n\t\t\u003cexclusion\u003e\n\t\t\t\u003cgroupId\u003eorg.springframework.boot\u003c/groupId\u003e\n\t\t\t\u003cartifactId\u003espring-boot-starter-logging\u003c/artifactId\u003e\n\t\t\u003c/exclusion\u003e\n\t\u003c/exclusions\u003e\n\u003c/dependency\u003e\n```\n– Add Log4j2 dependency\n\n```xml\n\u003cdependency\u003e\n\t\u003cgroupId\u003eorg.springframework.boot\u003c/groupId\u003e\n\t\u003cartifactId\u003espring-boot-starter-log4j2\u003c/artifactId\u003e\n\u003c/dependency\u003e\n```\n # Configure Log4j2.xml\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cConfiguration monitorInterval=\"60\"\u003e\n    \u003cProperties\u003e\n        \u003cProperty name=\"path\"\u003elogs\u003c/Property\u003e\n    \u003c/Properties\u003e\n    \u003cAppenders\u003e\n        \u003cConsole name=\"Console-Appender\" target=\"SYSTEM_OUT\"\u003e\n            \u003cPatternLayout\u003e\n                \u003cpattern\u003e\n                    [%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n\n                \u003c/pattern\u003e\u003e\n            \u003c/PatternLayout\u003e\n        \u003c/Console\u003e\n        \u003cFile name=\"App-Appender\" fileName=\"${path}/app_log.log\" \u003e\n            \u003cPatternLayout\u003e\n                \u003cpattern\u003e\n                    [%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n\n                \u003c/pattern\u003e\n            \u003c/PatternLayout\u003e\n        \u003c/File\u003e\n        \u003cFile name=\"SpringBoot-Appender\" fileName=\"${path}/springboot_log.log\" \u003e\n            \u003cPatternLayout\u003e\n                \u003cpattern\u003e\n                    [%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n\n                \u003c/pattern\u003e\n            \u003c/PatternLayout\u003e\n        \u003c/File\u003e\n    \u003c/Appenders\u003e\n    \u003cLoggers\u003e\n        \u003cLogger name=\"org.springframework.web\" level=\"info\" additivity=\"false\"\u003e\n            \u003cAppenderRef ref=\"SpringBoot-Appender\"/\u003e\n            \u003cAppenderRef ref=\"Console-Appender\"/\u003e\n        \u003c/Logger\u003e \n        \u003cLogger name=\"com.log4j.sample.Log4J2Conf\" level=\"info\" additivity=\"false\"\u003e\n            \u003cAppenderRef ref=\"App-Appender\"/\u003e\n            \u003cAppenderRef ref=\"Console-Appender\"/\u003e\n         \u003c/Logger\u003e\n        \u003cRoot\u003e\n            \u003cAppenderRef ref=\"Console-Appender\"/\u003e\n        \u003c/Root\u003e\n    \u003c/Loggers\u003e\n\u003c/Configuration\u003e\n```\n- You can use log4js2 with:\n\n1.  Log4J 2 Configuration: Using Properties File\n\n2. Log4J 2 Configuration: Using XML\n\n3.  Log4J 2 Configuration: Using JSON\n\n4. Log4J 2 Configuration: Using YAML\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanicetkeric%2Flog4j_sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanicetkeric%2Flog4j_sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanicetkeric%2Flog4j_sample/lists"}