{"id":16380173,"url":"https://github.com/felixklauke/guice-logback","last_synced_at":"2025-04-04T13:26:57.574Z","repository":{"id":48423997,"uuid":"119044683","full_name":"felixklauke/guice-logback","owner":"felixklauke","description":"Use google guice custom dependency injection to inject logback loggers. Makes it very easy to create class depending loggers instead of default java.util.Logger injection.","archived":false,"fork":false,"pushed_at":"2023-06-14T05:03:17.000Z","size":39,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"dev","last_synced_at":"2025-02-09T23:17:04.234Z","etag":null,"topics":["custom-injection","dependency-injection","extension","google","google-guice","guice","guice-extension","logback","logback-injection"],"latest_commit_sha":null,"homepage":"http://felix-klauke.de","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/felixklauke.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-01-26T11:35:23.000Z","updated_at":"2022-07-11T06:16:48.000Z","dependencies_parsed_at":"2024-12-17T16:44:01.943Z","dependency_job_id":"a5447b39-3090-43f3-abaa-5fb16565da73","html_url":"https://github.com/felixklauke/guice-logback","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felixklauke%2Fguice-logback","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felixklauke%2Fguice-logback/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felixklauke%2Fguice-logback/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felixklauke%2Fguice-logback/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/felixklauke","download_url":"https://codeload.github.com/felixklauke/guice-logback/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247184054,"owners_count":20897703,"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":["custom-injection","dependency-injection","extension","google","google-guice","guice","guice-extension","logback","logback-injection"],"created_at":"2024-10-11T03:50:38.407Z","updated_at":"2025-04-04T13:26:57.553Z","avatar_url":"https://github.com/felixklauke.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Logback Custom Injection for Google Guice\n\nEver tried dependency injection while you still want class specific logging? If you\ndon't want to break the sense of dependency injection you shouldn't use a static\nfactory in each class. Google Guice even supports logger injection but sadly only\nfor the default java.util.Logger. Be serious: Who really uses this in production\non enterprise level? We wan't custom injection of our own logging framework.\nIn this case we will use logback as our logging framework.\n\n# Usage\n- Install [Maven](http://maven.apache.org/download.cgi)\n- Clone this repo\n- Install: ```mvn clean install```\n\n**Maven dependencies**\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ede.felix-klauke\u003c/groupId\u003e\n    \u003cartifactId\u003egoogle-guice-logback\u003c/artifactId\u003e\n    \u003cversion\u003e1.0-SNAPSHOT\u003c/version\u003e\n    \u003cscope\u003ecompile\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\n# Example / How To\n\nFirst you will have to install our module in your injector. You can put the module\nin the injector creation or install our module in your main module.\n\n```java\nInjector injector = Guice.createInjector(new MyCoolModule(), new LogbackModule());\n```\n\n```java\n@Override\nprotected void configure() {\n    install(new LogbackModule);\n}\n```\n\nAs soon as the module is installed you can use on any field:\n\n```java\n@InjectLogback private Logger logger;\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelixklauke%2Fguice-logback","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelixklauke%2Fguice-logback","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelixklauke%2Fguice-logback/lists"}