{"id":15069360,"url":"https://github.com/schnitker/logmanager","last_synced_at":"2025-04-10T17:11:15.769Z","repository":{"id":20337010,"uuid":"23611542","full_name":"Schnitker/LogManager","owner":"Schnitker","description":"JDK LogManager implementations for Log4j, Log4j2 and Logback. Alternative to SLF4JBridgeHandler.","archived":false,"fork":false,"pushed_at":"2022-02-08T17:20:15.000Z","size":237,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T14:51:23.444Z","etag":null,"topics":["java","jdk","logging"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Schnitker.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}},"created_at":"2014-09-03T07:54:33.000Z","updated_at":"2023-10-14T05:18:10.000Z","dependencies_parsed_at":"2022-08-27T05:12:59.071Z","dependency_job_id":null,"html_url":"https://github.com/Schnitker/LogManager","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Schnitker%2FLogManager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Schnitker%2FLogManager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Schnitker%2FLogManager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Schnitker%2FLogManager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Schnitker","download_url":"https://codeload.github.com/Schnitker/LogManager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248261482,"owners_count":21074223,"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":["java","jdk","logging"],"created_at":"2024-09-25T01:41:59.988Z","updated_at":"2025-04-10T17:11:15.745Z","avatar_url":"https://github.com/Schnitker.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"LogManager\n==========\n\nJDK LogManager implementations for Log4j, Log4j2, Logback and servlet containers.\n\n### Introduction\n\nMy favorite Framework Jersey (JAX-RS 2.0) uses JDK logging. There are some disadvantages with JDK Logging:\n\n * multiple logging systems if you are using log4j or logback\n * without configuration the JDK logging output will be written to stderr\n * the handler SLF4JBridgeHandler has performance impacts (see http://www.slf4j.org/api/org/slf4j/bridge/SLF4JBridgeHandler.html)\n \nThis project allows you to redirect JDK logging to Log4j (1.x or 2.x) or Logback without performance costs.\nConfiguration changes are immediately noticed by the JDK logging wrapper. The JDK LogManager and Logger are completely replaced.\n\nThe Jersey Grizzly HTTP server (_jersey-container-grizzly2-http_) works fine with all wrapper implementations.\n\n### Usage (for applications)\n\n*   Set system property in main method: \u003cbr/\u003e\n    ``` System.setProperty( \"java.util.logging.manager\", JulLogManager.class.getName() ); ```\n\n*   Set system property on command line: \u003cbr/\u003e\n    ``` java -Djava.util.logging.manager=com.github.schnitker.logmgr.log4j.JulLogManager ```\n\n### Servlet container\n\nNote that the JDK LogManager does not work well with servlet containers. \n\nThere is an context class loader friendly implementation in the module 'logmgr-factory'. The factory searches through \nthe Java ServiceLoader for an implementation of _com.github.schnitker.logmgr.JulLoggerFactory_. The module 'logmgr-factory'\nmust be added to the bootstrap libraries and the system property _java.util.logging.manager_ must be set.\n\nEvery web application instance can contain one logging wrapper.\n\n\u003cpre\u003e\n|             Bootstrap                 | \u003c/br\u003e\n|          (logmgr-factory)             | \u003c/br\u003e\n+------------------+--------------------+ \u003c/br\u003e\n|    Webapp1       |     Webapp2        | \u003c/br\u003e\n|  (logmgr-log4j)  |  (logmgr-logback)  |\n\u003c/pre\u003e\n  \n##### Tomcat\n * Eclipse start: Add the VM argument _-Djava.util.logging.manager=com.github.schnitker.logmgr.JulLogManager_ and add the \n   logmgr-factory jar file in the run/debug configuration.\n * Installation: You must extend the CLASSPATH environment variable (add logmgr-factory.jar) and set the LOGGING_MANAGER environment \n   variable to _com.github.schnitker.logmgr.JulLogManager_ in the catalina shell script.\n\n### Maven Repository\n\nCurrent artifacts:\n\n*   Log4j 1.x implementation: \u003cbr/\u003e\n    ``` 'com.github.schnitker.logmanager:logmgr-log4j:1.0.2' ```\n\n*   Log4j 2.x implementation: \u003cbr/\u003e\n    ``` 'com.github.schnitker.logmanager:logmgr-log4j2:1.0.2' ```\n\n*   Logback implementation: \u003cbr/\u003e\n    ``` 'com.github.schnitker.logmanager:logmgr-logback:1.0.2' ```\n\n*   Servlet container implementation: \u003cbr/\u003e\n    ``` 'com.github.schnitker.logmanager:logmgr-factory:1.0.2' ```\n\n\n### Gradle\n\nThe project uses the gradle build system.\n \n * **Eclipse Setup**: Run the command 'gradlew eclipse' or 'gradlew cleanEclipse eclipse'.\n\n * **Building artifacts**: Call 'gradlew assemble'.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschnitker%2Flogmanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschnitker%2Flogmanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschnitker%2Flogmanager/lists"}