{"id":19257297,"url":"https://github.com/logzio/logzio-java-sender","last_synced_at":"2025-10-11T22:07:09.646Z","repository":{"id":44329125,"uuid":"77541577","full_name":"logzio/logzio-java-sender","owner":"logzio","description":"Java library to send structured logs (JSONs) to Logz.io via HTTPS. This the core component of Logzio Appenders in the different logging frameworks (log4j, log4j2, Logback) which can also be used on its own","archived":false,"fork":false,"pushed_at":"2025-05-19T05:54:59.000Z","size":319,"stargazers_count":13,"open_issues_count":8,"forks_count":5,"subscribers_count":54,"default_branch":"master","last_synced_at":"2025-07-20T03:42:27.585Z","etag":null,"topics":["integration","java","log-shipper","logzio"],"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/logzio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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}},"created_at":"2016-12-28T15:14:10.000Z","updated_at":"2025-05-14T16:02:05.000Z","dependencies_parsed_at":"2024-06-10T12:56:20.396Z","dependency_job_id":"ba3cb0c2-f274-4be5-b3cd-b30bfbec0fa0","html_url":"https://github.com/logzio/logzio-java-sender","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/logzio/logzio-java-sender","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logzio%2Flogzio-java-sender","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logzio%2Flogzio-java-sender/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logzio%2Flogzio-java-sender/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logzio%2Flogzio-java-sender/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/logzio","download_url":"https://codeload.github.com/logzio/logzio-java-sender/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logzio%2Flogzio-java-sender/sbom","scorecard":{"id":597517,"data":{"date":"2025-08-11","repo":{"name":"github.com/logzio/logzio-java-sender","commit":"804a6cfc2d7dbd0b1fb1875e703599eb80a68ac1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.1,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","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":"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":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: .mvn/wrapper/maven-wrapper.jar:1"],"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/release.yaml:1","Warn: no topLevel permission defined: .github/workflows/tests.yaml: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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yaml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/logzio/logzio-java-sender/release.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yaml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/logzio/logzio-java-sender/release.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yaml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/logzio/logzio-java-sender/tests.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yaml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/logzio/logzio-java-sender/tests.yaml/master?enable=pin","Info:   0 out of   4 GitHub-owned 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":"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":"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":"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:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/release.yaml:8"],"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":"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":"SAST","score":1,"reason":"SAST tool is not run on all commits -- score normalized to 1","details":["Warn: 4 commits out of 30 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-20T23:31:02.720Z","repository_id":44329125,"created_at":"2025-08-20T23:31:02.720Z","updated_at":"2025-08-20T23:31:02.720Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279009039,"owners_count":26084547,"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-11T02:00:06.511Z","response_time":55,"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":["integration","java","log-shipper","logzio"],"created_at":"2024-11-09T19:09:22.752Z","updated_at":"2025-10-11T22:07:09.640Z","avatar_url":"https://github.com/logzio.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/logzio/logzio-java-sender.svg?branch=master)](https://travis-ci.org/logzio/logzio-java-sender)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.logz.sender/logzio-sender/badge.svg)](http://mvnrepository.com/artifact/io.logz.sender/logzio-sender)\n\n# Logzio java sender\nThis sender sends logs messages to your [Logz.io](http://logz.io) account in JSON format, using non-blocking threading, bulks, and HTTPS encryption. Please note that this sender requires java 8 and up.\n\n### Technical Information\nThis appender uses [BigQueue](https://github.com/bulldog2011/bigqueue) implementation of persistent queue, so all logs are backed up to a local file system before being sent. Once you send a log, it will be enqueued in the queue and 100% non-blocking. There is a background task that will handle the log shipment for you. This jar is an \"Uber-Jar\" that shades both BigQueue, Gson and Guava to avoid \"dependency hell\".\n\n### Installation from maven\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.logz.sender\u003c/groupId\u003e\n    \u003cartifactId\u003elogzio-sender\u003c/artifactId\u003e\n    \u003cversion\u003e${logzio-sender-version}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n###### Installation from Gradle\n  \nIf you use Gradle, add the dependency to your project as follows:\n\n```java\nimplementation 'io.logz.sender:logzio-java-sender:${logzio-sender-version}'\n```\n\n### Parameters\n| Parameter                    | Default                         | Explained                                                                                                                                                                                                                          |\n|------------------------------|---------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **token**                    | *None*                          | Your Logz.io token, which can be found under \"settings\" in your account.                                                                                                                                                           |\n| **logzioType**               | *java*                          | The [log type](http://support.logz.io/support/solutions/articles/6000103063-what-is-type-) for that sender                                                                                                                         |\n| **drainTimeoutSec**          | *5*                             | How often the sender should drain the queue (in seconds)                                                                                                                                                                           |\n| **logzioUrl**                | *https://listener.logz.io:8071* | Logz.io URL, that can be found under \"Log Shipping -\u003e Libraries\" in your account.                                                                                                                                                  |\n| **socketTimeout**            | *10 * 1000*                     | The socket timeout during log shipment                                                                                                                                                                                             |\n| **connectTimeout**           | *10 * 1000*                     | The connection timeout during log shipment                                                                                                                                                                                         |\n| **debug**                    | *false*                         | Print some debug messages to stdout to help to diagnose issues                                                                                                                                                                     |\n| **compressRequests**         | *false*                         | Boolean. `true` if logs are compressed in gzip format before sending. `false` if logs are sent uncompressed.                                                                                                                       |\n| **exceedMaxSizeAction**      | `cut`                           | String. `cut` to truncate the message field or `drop` to drop log that exceed the allowed maximum size for logzio. If the log size exceeding the maximum size allowed after truncating the message field, the log will be dropped. |\n| **withOpentelemetryContext** | `true`                          | Boolean. Add trace_id, span_id, service_name fields to logs when opentelemetry context is available.                                                                                                                               |                               \n\n#### Parameters for in-memory queue\n| Parameter                        | Default             | Explained                                                                                                                                |\n|----------------------------------|---------------------|------------------------------------------------------------------------------------------------------------------------------------------|\n| **inMemoryQueueCapacityInBytes** | *1024 * 1024 * 100* | The amount of memory(bytes) we are allowed to use for the memory queue. If the value is -1 the sender will not limit the queue size.     |\n| **logsCountLimit**               | *-1*                | The number of logs in the memory queue before dropping new logs. Default value is -1 (the sender will not limit the queue by logs count) |\n\n\n#### Parameters for disk queue\n| Parameter                                | Default | Explained                                                                                                                                                                                                                                                                                        |\n|------------------------------------------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **queueDir**                             | *None*  | Where the sender should store the queue. It should be at least one folder in path.                                                                                                                                                                                                               |\n| **fileSystemFullPercentThreshold**       | *98*    | The percent of used file system space at which the sender will stop queueing. When we will reach that percentage, the file system in which the queue is stored will drop all new logs until the percentage of used space drops below that threshold. Set to -1 to never stop processing new logs |\n| **gcPersistedQueueFilesIntervalSeconds** | *30*    | How often the disk queue should clean sent logs from disk                                                                                                                                                                                                                                        |\n| **checkDiskSpaceInterval**               | *1000*  | How often the should disk queue check for space (in milliseconds)                                                                                                                                                                                                                                |\n\n\n\n### Code Example\nFrom version 1.0.15 we use a builder to get Logz.io sender\n```java\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport com.google.gson.JsonObject;\n\npublic class LogzioSenderExample {\n\n    public static void main(String[] args) {\n        \n        HttpsRequestConfiguration conf = HttpsRequestConfiguration\n                        .builder()\n                        .setLogzioListenerUrl(\"https://listener.logz.io:8071\")\n                        .setLogzioType(\"javaSenderType\")\n                        .setLogzioToken(\"123456789\")\n                        .build();\n        \n        // Use one of the following implementations\n        // 1) disk queue example \n        LogzioSender logzioSender = LogzioSender\n                        .builder()\n                        .setTasksExecutor(Executors.newScheduledThreadPool(3))\n                        .setReporter(new LogzioStatusReporter(){/*implement simple interface for logging sender logging */})\n                        .setHttpsRequestConfiguration(httpsRequestConfiguration)\n                        .withDiskQueue()\n                            .setQueueDir(queueDir)\n                        .endDiskQueue()\n                        .build();\n        \n        // 2) in memory queue example\n        LogzioSender logzioSender = LogzioSender\n                        .builder()\n                        .setTasksExecutor(Executors.newScheduledThreadPool(3))\n                        .setDrainTimeoutSec(drainTimeout)\n                        .setReporter(new LogzioStatusReporter(){/*implement simple interface for logging sender logging */})\n                        .setHttpsRequestConfiguration(conf)\n                        .withInMemoryQueue()\n                        .endInMemoryQueue()\n                        .build();\n\n        logzioSender.start();\n        JsonObject jsonMessage = createLogMessage(); // create JsonObject to send to logz.io\n        logzioSender.send(jsonMessage);\n    }\n}\n```\n\nUntil version 1.0.14\n```java\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport com.google.gson.JsonObject;\n\npublic class LogzioSenderExample {\n\n    public static void main(String[] args) {\n        LogzioSender sender =  LogzioSender.getOrCreateSenderByType(token, logzioType, drainTimeoutSec,fileSystemFullPercentThreshold, queueDir,\n                        logzioUrl, socketTimeout, serverTimeout, true, new LogzioStatusReporter(){/*implement simple interface for logging sender logging */}, Executors.newScheduledThreadPool(2),30);\n        sender.start();\n        JsonObject jsonMessage = createLogMessage(); // create JsonObject to send to logz.io\n        sender.send(jsonMessage);\n    }\n}\n```\n\n\n## Build and test locally\n1. Clone the repository:\n  ```bash\n  git clone https://github.com/logzio/logzio-java-sender.git\n  cd logzio-java-sender\n  ```\n2. Build and run tests:\n  ```bash\n  mvn clean compile\n  mvn test\n  ```\n\n\n## Release notes\n- 2.3.0\n    - Upgraded `logzio-sender-test` to use Jetty 12 with Servlet EE9 environment.\n    - Upgrade dependencies.\n - 2.2.0\n   - Add `WithOpentelemetryContext` parameter to add `trace_id`, `span_id`, `service_name` fields to logs when opentelemetry context is available.\n - 2.1.0\n   - Upgrade packages versions\n - 2.0.1\n   - Add `User-Agent` header with logz.io information\n - 2.0.0 - **THIS IS A SNAPSHOT RELEASE - SUPPORTED WITH JDK 11 AND ABOVE** \n   - Replaced `BigQueue` module:\n      - Fixes an issue where DiskQueue was not clearing disk space when using JDK 11 and above.\n      - Added `clear()` to `LogzioSender` - enables to clear the disk/in memory queue on demand.\n - 1.1.8\n   - Fix an issue where log is not being truncated properly between size of 32.7k to 500k.\n\n\n\u003cdetails\u003e\n  \u003csummary markdown=\"span\"\u003e Expand to check old versions \u003c/summary\u003e\n - 1.1.7\n   - replaced bigqueue dependency to a better maintained module\n - 1.1.5\n   - dependency bumps\n   - validation and handling for oversized logs with exceedMaxSizeAction parameter\n - 1.1.2\n   - LogsQueue interface is now public\n- 1.1.1\n   - bug fix\n - 1.1.0\n   - remove deprecated getOrCreateSenderByType function\n   - changed logzioSenderInstances Map key to hold an immutable pair of hashed token and log type\n - 1.0.19-20\n   - minor dependency security updates\n - 1.0.18\n   - add byte[] send option\n - 1.0.17\n   - add support for log count limit option \n - 1.0.16\n   - add implementation for in memory queue\n - 1.0.12 \n   - separating https request from the sender\n   - add a builder for sender, http configuration, and queues implementation  \n - 1.0.11 fix shaded\n - 1.0.10 add gzip compression\n - 1.0.9 add auto deploy\n - 1.0.8 fix st issue: [Shaded library still listed as dependencies](https://github.com/logzio/logzio-java-sender/issues/13)\n - 1.0.6 -1.0.7\n   - add error message about reason of 400(BAD REQUEST)\n - 1.0.5 \n   - add runtime dependency on slf4j-api\n   - fix NulPointerException\n - 1.0.1-1.0.4\n   - Fix dependencies issue\n - 1.0.0\n   - Initial release\n   \u003c/details\u003e\n\n### Contribution\n - Fork\n - Code\n - ```mvn test```\n - Issue a PR :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogzio%2Flogzio-java-sender","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flogzio%2Flogzio-java-sender","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogzio%2Flogzio-java-sender/lists"}