{"id":15013805,"url":"https://github.com/quarkiverse/quarkus-logging-json","last_synced_at":"2026-04-01T17:46:01.293Z","repository":{"id":37822900,"uuid":"300278912","full_name":"quarkiverse/quarkus-logging-json","owner":"quarkiverse","description":"Quarkus logging extension outputting the logging in json.","archived":false,"fork":false,"pushed_at":"2026-03-18T21:14:00.000Z","size":472,"stargazers_count":81,"open_issues_count":10,"forks_count":36,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-03-19T08:50:03.546Z","etag":null,"topics":["hacktoberfest","json","logging","quarkus","quarkus-extension"],"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/quarkiverse.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":".github/CODEOWNERS","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-10-01T12:54:47.000Z","updated_at":"2026-03-19T01:43:58.000Z","dependencies_parsed_at":"2024-03-20T11:56:47.810Z","dependency_job_id":"5fd02ab7-2c3f-48bc-8f00-1302d7660132","html_url":"https://github.com/quarkiverse/quarkus-logging-json","commit_stats":{"total_commits":230,"total_committers":17,"mean_commits":"13.529411764705882","dds":0.682608695652174,"last_synced_commit":"456df79bbd5676dd113e1114e1635bb57294ae84"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/quarkiverse/quarkus-logging-json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarkiverse%2Fquarkus-logging-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarkiverse%2Fquarkus-logging-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarkiverse%2Fquarkus-logging-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarkiverse%2Fquarkus-logging-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quarkiverse","download_url":"https://codeload.github.com/quarkiverse/quarkus-logging-json/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quarkiverse%2Fquarkus-logging-json/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290583,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","json","logging","quarkus","quarkus-extension"],"created_at":"2024-09-24T19:44:48.181Z","updated_at":"2026-04-01T17:46:01.286Z","avatar_url":"https://github.com/quarkiverse.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Maven Central](https://img.shields.io/maven-central/v/io.quarkiverse.loggingjson/quarkus-logging-json?logo=apache-maven\u0026style=for-the-badge)](https://search.maven.org/artifact/io.quarkiverse.loggingjson/quarkus-logging-json)\n[![Sonar Coverage](https://img.shields.io/sonar/coverage/quarkiverse_quarkus-logging-json?logo=sonarcloud\u0026server=https%3A%2F%2Fsonarcloud.io\u0026style=for-the-badge)](https://sonarcloud.io/dashboard?id=quarkiverse_quarkus-logging-json)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n# Quarkus Logging JSON\nQuarkus logging extension outputting the log messages in JSON.\nIt supports the following formats: default, [Elastic Common Schema (ECS)](https://www.elastic.co/guide/en/ecs-logging/overview/current/intro.html).\n\n## Version to use\n| Quarkus Version | Use version  |\n|-----------------|--------------|\n| 3.x.x           | 3.x.x        |\n| 2.x.x           | 1.x.x, 2.x.x |\n\n# Configuration\nThe extension is enabled by default for console and socket, when added to the project.\nConsole json logging can be disabled using configuration: `quarkus.log.json.console.enabled=false`\nSocket json logging can be disabled using configuration: `quarkus.log.json.socket.enabled=false`\n\nTo see additional configuration options take a look at [Config](https://quarkiverse.github.io/quarkiverse-docs/quarkus-logging-json/dev/index.html)\n\n## Elastic Common Scheme\n```properties\nquarkus.log.json.log-format=ecs\n```\n\n# Add additional fields to all log messages\nIf you want to add a static field to all the log message, that is possible using the configuration.\n```properties\nquarkus.log.json.additional-field.serviceName.value=service-a\n# type is by default STRING - Other is INT, LONG, FLOAT, DOUBLE \nquarkus.log.json.additional-field.buildNumber.type=INT\nquarkus.log.json.additional-field.buildNumber.value=42\n```\n\n# Structured argument\nIf you want to do structured logging of arguments, then the argument send with your logging, can implement `io.quarkiverse.loggingjson.providers.StructuredArgument`. Then it is possible to use the JsonGenerator to format the argument in json. \n\n## Simple usage\n```java\nimport static io.quarkiverse.loggingjson.providers.KeyValueStructuredArgument.*;\n...\nlog.info(\"Test log of structured arg\", kv(\"key\", \"value\"));\n```\n# Custom log handler\nIf you want to add your own custom way to handle the LogRecords.\nYou can create your own implementations of `io.quarkiverse.loggingjson.JsonProvider`, and provide it using CDI.\nExample implementation:\n```java\nimport jakarta.inject.Singleton;\nimport java.io.IOException;\n\nimport io.quarkiverse.loggingjson.JsonProvider;\nimport io.quarkiverse.loggingjson.JsonGenerator;\nimport org.jboss.logmanager.ExtLogRecord;\n\n@Singleton\npublic class MyJsonProvider implements JsonProvider {\n\n    @Override\n    public void writeTo(JsonGenerator generator, ExtLogRecord event) throws IOException {\n        generator.writeStringField(\"myCustomField\", \"and my custom value\"); // Will be added to every log, as a field on the json.\n    }\n}\n```\n\n## Fully customized json output without providers (`log-format=none`)\nSometimes there is a need for a fully customized json output (e.g. for support of corporate json log format): The usual adjustment methods of the log output are not sufficient, if some of the existing providers are needed to be moved down the json object tree to some subobject inside attributes (e.g. put the message inside a json `data` object `data.message`). \n\nIn such cases the idea is to start with an empty format by adding\n\n```properties\nquarkus.log.json.log-format=none\n```\n\nto the configuration. This format doesn't add any fields to the json output and ignores any field specific configuration. Next you need to implement the full json output yourself, by writing a custom `JsonProvider` implementation (here putting the message inside the `data` object):\n\n```java\nimport jakarta.inject.Singleton;\nimport java.io.IOException;\n\nimport io.quarkiverse.loggingjson.JsonProvider;\nimport io.quarkiverse.loggingjson.JsonGenerator;\nimport org.jboss.logmanager.ExtLogRecord;\n\n@Singleton\npublic class FullyCustomizedJsonProvider implements JsonProvider {\n\n    @Override\n    public void writeTo(JsonGenerator generator, ExtLogRecord event) throws IOException {\n        generator.writeObjectField(\"data\", Map.of(\"message\", event.getMessage())); // outputs the message inside a data object\n    }\n}\n```\n\nIn the above example, the `message` is just written plain, see `MessageJsonProvider` for an example on how to write the message formatted for being written into json.\n\n## Configuration Properties Relocation\n\nIn 3.2.0, two configuration properties were renamed to be more consistent with Quarkus configuration.\n\n- Old: `quarkus.log.json.console.enable` → New: `quarkus.log.json.console.enabled`\n- Old: `quarkus.log.json.file.enable` → New: `quarkus.log.json.file.enabled`\n\nA relocation/fallback mechanism has been added so the old properties are still supported\nbut we recomment that you switch to the new ones\n(`quarkus update` will do it for you).\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/SlyngDK\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/6666094?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eSimon Bengtsson\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/quarkiverse/quarkus-logging-json/commits?author=SlyngDK\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#maintenance-SlyngDK\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-enable --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n\n`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquarkiverse%2Fquarkus-logging-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquarkiverse%2Fquarkus-logging-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquarkiverse%2Fquarkus-logging-json/lists"}