{"id":23756797,"url":"https://github.com/s4u/slf4j-mock","last_synced_at":"2025-10-04T16:12:41.945Z","repository":{"id":38456769,"uuid":"264016312","full_name":"s4u/slf4j-mock","owner":"s4u","description":"Library to easy mock request on sl4j-api","archived":false,"fork":false,"pushed_at":"2025-09-19T10:04:14.000Z","size":871,"stargazers_count":32,"open_issues_count":5,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-19T12:26:58.226Z","etag":null,"topics":["hacktoberfest","java","mock","slf4j","testing"],"latest_commit_sha":null,"homepage":"https://www.simplify4u.org/slf4j-mock/","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/s4u.png","metadata":{"funding":{"github":"slawekjaranowski"},"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-05-14T20:18:21.000Z","updated_at":"2025-09-19T10:04:18.000Z","dependencies_parsed_at":"2024-01-25T12:00:08.730Z","dependency_job_id":"b3d0a8ff-b2a1-49ba-bf63-91c6a1c70149","html_url":"https://github.com/s4u/slf4j-mock","commit_stats":{"total_commits":263,"total_committers":9,"mean_commits":29.22222222222222,"dds":0.5399239543726235,"last_synced_commit":"4e1cc2e5cf30b6696194434015eeba1466c5e211"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/s4u/slf4j-mock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s4u%2Fslf4j-mock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s4u%2Fslf4j-mock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s4u%2Fslf4j-mock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s4u%2Fslf4j-mock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s4u","download_url":"https://codeload.github.com/s4u/slf4j-mock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s4u%2Fslf4j-mock/sbom","scorecard":{"id":793964,"data":{"date":"2025-08-11","repo":{"name":"github.com/s4u/slf4j-mock","commit":"3f7c0737d557e8ba6e1f389b09757bce2296511a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":5,"reason":"6 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":4,"reason":"Found 2/5 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/auto-approve.yml:8: update your workflow using https://app.stepsecurity.io/secureworkflow/s4u/slf4j-mock/auto-approve.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/s4u/slf4j-mock/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pr.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/s4u/slf4j-mock/pr.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release-drafter.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/s4u/slf4j-mock/release-drafter.yml/master?enable=pin","Info:   0 out of   4 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/auto-approve.yml:1","Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/pr.yml:1","Warn: no topLevel permission defined: .github/workflows/release-drafter.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":8,"reason":"SAST tool is not run on all commits -- score normalized to 8","details":["Warn: 23 commits out of 27 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T08:23:30.445Z","repository_id":38456769,"created_at":"2025-08-23T08:23:30.445Z","updated_at":"2025-08-23T08:23:30.445Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278337067,"owners_count":25970432,"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-10-04T02:00:05.491Z","response_time":63,"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":["hacktoberfest","java","mock","slf4j","testing"],"created_at":"2024-12-31T19:19:06.538Z","updated_at":"2025-10-04T16:12:41.913Z","avatar_url":"https://github.com/s4u.png","language":"Java","funding_links":["https://github.com/sponsors/slawekjaranowski"],"categories":[],"sub_categories":[],"readme":"# SLF4J mock\n[![Build](https://github.com/s4u/slf4j-mock/workflows/Build/badge.svg)](https://github.com/s4u/slf4j-mock/actions?query=workflow%3ABuild)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.simplify4u/slf4j-mock/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.simplify4u/slf4j-mock)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=org.simplify4u%3Aslf4j-mock-parent\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=org.simplify4u%3Aslf4j-mock-parent)\n[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=org.simplify4u%3Aslf4j-mock-parent\u0026metric=ncloc)](https://sonarcloud.io/dashboard?id=org.simplify4u%3Aslf4j-mock-parent)\n\nYet another way to testing logging in application which use SLF4J.\n\n## Features\n - this binding support for easy create `Mockito` mock for `Logger`\n - call to `Logger` can be delegated to instance of `SimpleLogger`,\n   so we can create standard `simplelogger.properties` \n - support for testing and mocking `MDC`\n - light transitive dependencies - only `slf4j-api` and `mockito-core`\n - support testing in parallel in multi thread\n - all the Magic are done by `Mockito` plugins, so you don't need to directly use class from this library\n - ease use\n \n## Example of usage\n\nAdd dependency to your project:\n\nFor `SLF4J 1.7.x` \n\n    \u003cdependencies\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.simplify4u\u003c/groupId\u003e\n            \u003cartifactId\u003eslf4j-mock\u003c/artifactId\u003e\n            \u003cversion\u003e\u003c!-- check relases page --\u003e\u003c/version\u003e  \n            \u003cscope\u003etest\u003c/scope\u003e        \n        \u003c/dependency\u003e\n    \u003cdependencies\u003e\n\nFor `SLF4J 2.x`\n\n    \u003cdependencies\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.simplify4u\u003c/groupId\u003e\n            \u003cartifactId\u003eslf4j2-mock\u003c/artifactId\u003e\n            \u003cversion\u003e\u003c!-- check relases page --\u003e\u003c/version\u003e  \n            \u003cscope\u003etest\u003c/scope\u003e        \n        \u003c/dependency\u003e\n    \u003cdependencies\u003e\n\nPlease remember, that you can only have one `SLF4J` binding or provider on classpath,\nin the most case you must replace `org.slf4j:slf4j-simple` by `org.simplify4u:slf4j-mock`.\n\nWrite test:\n\n    class MyTest {\n\n        @Mock\n        Logger logger;\n    \n        @InjectMocks\n        Example sut;\n\n        @Test\n        public void logInfoShouldBeLogged() {\n    \n            // when\n            sut.methodWithLogInfo(INFO_TEST_MESSAGE);\n    \n            // then\n            verify(logger).info(INFO_TEST_MESSAGE);\n            verifyNoMoreInteractions(logger);\n        }\n    }\n\n# Project homepage\n\nMore information and examples you can find on site:\n\nhttps://www.simplify4u.org/slf4j-mock/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs4u%2Fslf4j-mock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs4u%2Fslf4j-mock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs4u%2Fslf4j-mock/lists"}