{"id":39132099,"url":"https://github.com/y-scope/log4j2-appenders","last_synced_at":"2026-01-17T21:19:01.659Z","repository":{"id":260110309,"uuid":"880181908","full_name":"y-scope/log4j2-appenders","owner":"y-scope","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-27T21:55:15.000Z","size":48,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-28T06:47:27.176Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/y-scope.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}},"created_at":"2024-10-29T09:15:20.000Z","updated_at":"2025-02-27T21:55:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"4b5dfa5f-4b5b-419a-8009-feb2fbdcbcfc","html_url":"https://github.com/y-scope/log4j2-appenders","commit_stats":null,"previous_names":["y-scope/log4j2-appenders"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/y-scope/log4j2-appenders","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y-scope%2Flog4j2-appenders","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y-scope%2Flog4j2-appenders/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y-scope%2Flog4j2-appenders/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y-scope%2Flog4j2-appenders/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/y-scope","download_url":"https://codeload.github.com/y-scope/log4j2-appenders/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y-scope%2Flog4j2-appenders/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28518618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T18:55:29.170Z","status":"ssl_error","status_checked_at":"2026-01-17T18:55:03.375Z","response_time":85,"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":[],"created_at":"2026-01-17T21:19:01.569Z","updated_at":"2026-01-17T21:19:01.640Z","avatar_url":"https://github.com/y-scope.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# log4j2-appenders\nThis is a repository for a set of useful [Log4j 2][log4j2] appenders. Currently, it contains:\n\n* `ClpIrFileAppender` - Used to compress log events using [CLP](https://github.com/y-scope/clp)'s IR\n  stream format, allowing users to achieve higher compression than general-purpose compressors while\n  the logs are being generated.\n\n* `AbstractBufferedRollingFileAppender` - An abstract class which enforces an opinionated workflow,\n  skeleton interfaces, and hooks optimized towards buffered rolling file appender implementations\n  with remote persistent storage. In addition, the abstract class implements a log-level-aware\n  hard + soft timeout-based log-freshness policy.\n\n* `AbstractClpirBufferedRollingFileAppender` - Provides size-based file rollover, log freshness\n  guarantee, and streaming compression offered by `ClpIrFileAppender`.\n\n# Usage\n## `ClpIrFileAppender`\n1. Add the package and its dependencies to the `dependencies` section of your `pom.xml`:\n\n   ```xml\n   \u003cdependencies\u003e\n     \u003c!-- The appenders --\u003e\n     \u003cdependency\u003e\n       \u003cgroupId\u003ecom.yscope.logging\u003c/groupId\u003e\n       \u003cartifactId\u003elog4j2-appenders\u003c/artifactId\u003e\n       \u003cversion\u003e0.1.0\u003c/version\u003e\n     \u003c/dependency\u003e\n\n     \u003c!-- Packages that log4j2-appenders depends on --\u003e\n     \u003cdependency\u003e\n       \u003cgroupId\u003ecom.github.luben\u003c/groupId\u003e\n       \u003cartifactId\u003ezstd-jni\u003c/artifactId\u003e\n       \u003cversion\u003e1.5.6-7\u003c/version\u003e\n     \u003c/dependency\u003e\n     \u003cdependency\u003e\n       \u003cgroupId\u003eorg.apache.logging.log4j\u003c/groupId\u003e\n       \u003cartifactId\u003elog4j-api\u003c/artifactId\u003e\n       \u003cversion\u003e2.24.1\u003c/version\u003e\n     \u003c/dependency\u003e\n     \u003cdependency\u003e\n       \u003cgroupId\u003eorg.apache.logging.log4j\u003c/groupId\u003e\n       \u003cartifactId\u003elog4j-core\u003c/artifactId\u003e\n       \u003cversion\u003e2.24.1\u003c/version\u003e\n     \u003c/dependency\u003e\n   \u003c/dependencies\u003e\n   ```\n\n2. Add the appender to your Log4j2 configuration file. Here is a sample `log4j2.properties` file:\n\n   ```properties\n    rootLogger.level = INFO\n    rootLogger.appenderRef.clpir.ref = clpir\n\n    appender.clpir.type = com.yscope.logging.log4j2.ClpIrFileAppender\n    appender.clpir.layout.type = PatternLayout\n\n    # NOTE:\n    # 1. This appender doesn't require a date conversion pattern in the conversion pattern. This is\n    #    because the CLP appender stores the timestamp separately from the message. CLP's IR\n    #    decoders will allow users to specify their desired timestamp format when decoding the logs.\n    # 2. If a date conversion pattern is added, it will be removed from the conversion pattern. This\n    #    may result in an ugly conversion pattern since the spaces around the date pattern are not\n    #    removed.\n    appender.clpir.layout.pattern = %d{yy/MM/dd HH:mm:ss} %p %c{1}: %m%n\n    appender.clpir.file=logs.clp.zst\n\n    # Use CLP's four-byte encoding for lower memory usage at the cost of some compression ratio\n    appender.clpir.UseFourByteEncoding = true\n\n    # closeFrameOnFlush:\n    # - true: Any data buffered by the compressor is immediately flushed to disk; frequent flushes\n    #   may lower compression ratio significantly\n    # - false: Any compressed data that is ready for writing will be flushed to disk\n    appender.clpir.CloseFrameOnFlush=false\n\n    # compressionLevel: Higher compression levels may increase compression ratio but will slow down\n    # compression. Valid compression levels are 1-19.\n    appender.clpir.CompressionLevel = 3\n   ```\n\n## `AbstractClpIrBufferedRollingFileAppender`\nTo use this appender, at minimum, we expect the user to implement the `sync()` method to perform\nfile upload to remote persistent storage.\n\n# Providing Feedback\nYou can use GitHub issues to [report a bug][report-bug] or [request a feature][feature-req].\n\n# Contributing\nFollow the steps below to develop and contribute to the project.\n\n## Set up\nInitialize and update the submodules:\n```shell\ngit submodule update --init --recursive\n```\n\n## Requirements\n\n* JDK 11\n* Maven 3.8 or newer\n\n## Building\nBuild and test:\n```shell\nmvn package\n```\n\nBuild without testing:\n```shell\nmvn package -DskipTests\n```\n\n## Testing\n```shell\nmvn test\n```\n\n## Linting\nBefore submitting a pull request, ensure you’ve run the linting [commands](#running-the-linters)\nbelow and either fixed any violations or suppressed the warnings.\n\n### Requirements\n* Python 3.10 or higher\n* [Task] 3.38.0 or higher\n\n### Adding files\nCertain file types need to be added to our linting rules manually:\n\n* If adding a **YAML** file (regardless of its extension), add it as an argument to the `yamllint`\n  command in [lint-tasks.yaml](lint-tasks.yaml).\n\n### Running the linters\nTo run all linting checks:\n```shell\ntask lint:check\n```\n\nTo run all linting checks AND automatically fix any fixable issues:\n```shell\ntask lint:fix\n```\n\n### Running specific linters\nThe commands above run all linting checks, but for performance you may want to run a subset (e.g.,\nif you only changed Java files, you don't need to run the YAML linting checks) using one of the\ntasks in the table below.\n\n| Task                     | Description                                               |\n|--------------------------|-----------------------------------------------------------|\n| `lint:java-check`        | Runs the Java linters (formatters and static analyzers).  |\n| `lint:java-fix`          | Runs the Java linters and fixes some violations.          |\n| `lint:java-format-check` | Runs the Java formatters.                                 |\n| `lint:java-format-fix`   | Runs the Java formatters and fixes some violations.       |\n| `lint:java-static-check` | Runs the Java static analyzers.                           |\n| `lint:java-static-fix`   | Runs the Java static analyzers and fixes some violations. |\n| `lint:yml-check`         | Runs the YAML linters.                                    |\n| `lint:yml-fix`           | Runs the YAML linters and fixes some violations.          |\n\n[feature-req]: https://github.com/y-scope/log4j2-appenders/issues/new?assignees=\u0026labels=enhancement\u0026template=feature-request.yml \n[log4j2]: https://logging.apache.org/log4j/2.x/index.html\n[report-bug]: https://github.com/y-scope/log4j2-appenders/issues/new?assignees=\u0026labels=bug\u0026template=bug-report.yml\n[Task]: https://taskfile.dev\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fy-scope%2Flog4j2-appenders","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fy-scope%2Flog4j2-appenders","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fy-scope%2Flog4j2-appenders/lists"}