{"id":14973026,"url":"https://github.com/jahnelgroup/flogger","last_synced_at":"2025-10-26T20:32:26.248Z","repository":{"id":57725468,"uuid":"131743946","full_name":"JahnelGroup/flogger","owner":"JahnelGroup","description":"Flogger is an AspectJ library that provides the ability to easily add information to your logging framwork's MDC.","archived":false,"fork":false,"pushed_at":"2023-12-05T22:18:05.000Z","size":149,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-01T00:26:39.368Z","etag":null,"topics":["annotations","aspectj-library","java","mdc","spring-boot"],"latest_commit_sha":null,"homepage":"","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/JahnelGroup.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":"2018-05-01T17:45:16.000Z","updated_at":"2019-09-13T22:31:29.000Z","dependencies_parsed_at":"2022-09-11T19:21:37.423Z","dependency_job_id":null,"html_url":"https://github.com/JahnelGroup/flogger","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JahnelGroup%2Fflogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JahnelGroup%2Fflogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JahnelGroup%2Fflogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JahnelGroup%2Fflogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JahnelGroup","download_url":"https://codeload.github.com/JahnelGroup/flogger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238397232,"owners_count":19465138,"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":["annotations","aspectj-library","java","mdc","spring-boot"],"created_at":"2024-09-24T13:47:58.146Z","updated_at":"2025-10-26T20:32:20.931Z","avatar_url":"https://github.com/JahnelGroup.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flogger\n[![Build Status](https://travis-ci.org/JahnelGroup/flogger.svg?branch=master)](https://travis-ci.org/JahnelGroup/flogger)\n\u003e Whip your logs into shape!\n\nFlogger is an AspectJ library that provides the ability to easily add information to the MDC.\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [License](#license)\n\n## Install\n\n### Spring Boot\n\nAdding Flogger to a Spring Boot project is as simple as adding a dependency to `flogger-spring-boot`.\n\n```\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.jahnelgroup.flogger\u003c/groupId\u003e\n    \u003cartifactId\u003eflogger-spring-boot\u003c/artifactId\u003e\n    \u003cversion\u003e2.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Java 8\n\nFlogger can also be used in plain Java projects using the `aspectj-maven-plugin`.\n\n`flogger-sample` is an example project showing how to set it up.\n\n## Usage\n\nTo add method parameters to the MDC, annotate them with `@BindParam`.\n\nTo add the return value of a method to the MDC, annotate the method with `@BindReturn`.\n\nThe key in the MDC can be customized by the `value` field on both annotations.\n\n### Expansion\n\nYou can expand an object before it gets added to the MDC by setting `expand=true` in the annotations.\n\nThis will add the object's field values and method return values (only methods that take 0 parameters) \nto the MDC instead of calling `.toString()` on the object.\n\nBy default, every field and method on the object will be added to the MDC. This can be customized similar\nto Lombok's `@EqualsAndHashCode`.\n\nTo exclude a field/method, annotate it with `@BindExpand.Exclude`.\n\nYou can specify exactly which fields/methods are to be added to the MDC by annotating the object's class with \n`@BindExpand(onlyExplicityIncluded=true)` and then each method/field you wish to add with `@BindExpand.Include`.\n\nThe key in the MDC for expanded fields/methods can be customized by the `value` field on `@BindExpand.Include`.\n\n#### Example\n\n```\npublic class Expanded {\n    \n    private String field = \"field\"\n\n    private String method() {\n        return \"method\";    \n    }\n    \n    public String toString() {\n        return \"expanded.toString()\";\n    }\n}\n\n...\n\npublic void method(@BindParam(expand=?) Expanded expanded) {...}\n```\n\nWhen `expand=false` the MDC contains :\n\n```\n{expanded=expanded.toString()}\n```\n\nWhen `expand=true` the MDC contains:\n\n```\n{field=field, method=method, toString=expanded.toString()}\n```\n\n## License\n\n[MIT © Jahnel Group](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjahnelgroup%2Fflogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjahnelgroup%2Fflogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjahnelgroup%2Fflogger/lists"}