{"id":37030379,"url":"https://github.com/m-moris/log4j2-azure-blob-appender","last_synced_at":"2026-01-14T03:42:05.681Z","repository":{"id":41820711,"uuid":"190517814","full_name":"m-moris/log4j2-azure-blob-appender","owner":"m-moris","description":"Azure Blob Appender for Log4j2","archived":false,"fork":false,"pushed_at":"2025-02-04T11:33:04.000Z","size":92,"stargazers_count":3,"open_issues_count":0,"forks_count":6,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-07T17:14:32.478Z","etag":null,"topics":["azure","blob","log4j2"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m-moris.png","metadata":{"files":{"readme":"README.ja.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2019-06-06T05:10:18.000Z","updated_at":"2025-02-04T11:32:24.000Z","dependencies_parsed_at":"2025-02-04T12:22:41.103Z","dependency_job_id":"677c853f-f63b-47c7-bd4d-e8532444a9d1","html_url":"https://github.com/m-moris/log4j2-azure-blob-appender","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/m-moris/log4j2-azure-blob-appender","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-moris%2Flog4j2-azure-blob-appender","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-moris%2Flog4j2-azure-blob-appender/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-moris%2Flog4j2-azure-blob-appender/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-moris%2Flog4j2-azure-blob-appender/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m-moris","download_url":"https://codeload.github.com/m-moris/log4j2-azure-blob-appender/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-moris%2Flog4j2-azure-blob-appender/sbom","scorecard":{"id":608038,"data":{"date":"2025-08-11","repo":{"name":"github.com/m-moris/log4j2-azure-blob-appender","commit":"9db392e8a84576b4ddd1b75823ec4b5d782477f2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.8,"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":"Code-Review","score":0,"reason":"Found 0/15 approved changesets -- score normalized to 0","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":"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":-1,"reason":"no dependencies found","details":null,"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":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 22 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":4,"reason":"6 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-prj3-ccx8-p6x4","Warn: Project is vulnerable to: GHSA-389x-839f-4rhx","Warn: Project is vulnerable to: GHSA-xq3w-v528-46rv","Warn: Project is vulnerable to: GHSA-4g8c-wm8x-jfhw","Warn: Project is vulnerable to: GHSA-4q2v-9p7v-3v22","Warn: Project is vulnerable to: GHSA-pq2g-wx69-c263"],"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-21T02:03:00.362Z","repository_id":41820711,"created_at":"2025-08-21T02:03:00.362Z","updated_at":"2025-08-21T02:03:00.362Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408856,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"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":["azure","blob","log4j2"],"created_at":"2026-01-14T03:42:05.107Z","updated_at":"2026-01-14T03:42:05.665Z","avatar_url":"https://github.com/m-moris.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure Blob Appender \n\n[![Apache License, Version 2.0, January 2004](https://img.shields.io/github/license/apache/maven.svg?label=License)](https://www.apache.org/licenses/LICENSE-2.0.txt)\n[![Maven Central](https://img.shields.io/maven-central/v/io.github.m-moris/log4j2-azure-blob-appender)](https://search.maven.org/search?q=a:log4j2-azure-blob-appender)\n\nAzure Storage Blob にログを出力する log4j2用のカスタムアペンダーです。ストレージアカウントやキーをなどを直接指定する方法と、Azure App Service  (WebApps) のアプリケーション診断ログを利用する方法があります。\n\n## What's New\n\n** 2025/02 **\n\n依存ライブラリのバージョンを更新しました\n\n**重要 2024/03**\n\nマネージドIDに対応しました。内部的に `DefaultAzureCredential` を利用しています。\n\n**更新 2024/03**\n\n- 依存ライブラリの更新\n- JDKバージョンを8から11に変更しました\n\n**重要 2022/4/28**\n\nツール内部で利用している Azure SDK BLOBのバージョンを、V8系からV12系にアップデートしました。特にインタフェースに変更はありません。\n\nそれとともにツールバージョンを、V2系にしました。\n\n## WebAppsモード\n\nAApp Service には、アプリ診断ログ機能がありますが、これは .NET アプリケーションでのみ有効で、Javaから利用できませんが、これを解決することができます。ただし実行環境がWindowsの場合のみです。\n\n[アプリの診断ログの有効化 - Azure App Service | Microsoft Docs](https://docs.microsoft.com/ja-jp/azure/app-service/troubleshoot-diagnostic-logs)\n\n### 仕組み\n\nApp Service のアプリ診断ログを有効にすると、`DIAGNOSTICS_AZUREBLOBCONTAINERSASURL` 環境変数にSAS付きのStorage URLが設定されます。Azure Blob Appender はこのBLOBに追記するようにログを出力します。\n\n参照する環境変数は以下の通りです、逆に言えば以下の環境変数が設定されていれば利用できます。\n\n* `DIAGNOSTICS_AZUREBLOBCONTAINERSASURL`\n* `WEBSITE_SITE_NAME`\n* `WEBSITE_INSTANCE_ID`\n\nLinux ベースの WebAppsには、アプリ診断ログ機能が用意されていないので利用できませんが。ただし、該当の環境変数を設定しておけば、動作すると思います。\n\n## 一般モード\n\n構成ファイルにストレージアカウントやキーを直接指定する方法です。\n\n### 設定すべき項目\n\n設定すべき項目は以下の通りです。後述するディレクトリ構造で出力するためPrefix1/Prefix2の指定が必要です。\n\nストレージキーで認証を利用する場合は以下の3つの値が必要です。\n\n* ストレージアカウント\n* ストレージアカウントキー\n* コンテナ名\n\nマネージドIDで認証を利用する場合は以下の1つの値が必要です。\n\n* コンテナ名を含むBLOB URI （例 `https://{your-storage-account-name}.blob.core.windows.net/logs`）\n\n階層を指定するための2つの値が必要です。\n\n* Prefix1 \n* Prefix2\n\n## BLOBのディレクトリ\n\nWebAppsモードでは、 .NET アプリの診断ログと同じ構造で出力します。\n\n`{WEBSITE_SITE_NAME}/yyyy/mm/dd/HH/{WEBSITE_INSTANCE_ID}_applicationLog.txt`\n\n一般モードでは以下となります。\n\n`{Prefix1}/yyyy/mm/dd/HH/{Prefix2}_applicationLog.txt`\n\nlog4j2の構成ファイルでは環境変数を参照できるので、実行する環境に適切な値を設定できます。\n\n## 構成ファイル\n\n設定する属性は以下の通り。\n\n| 属性          | 型      | 意味                                                                   |\n| ------------- | ------- | ---------------------------------------------------------------------- |\n| webapps       | boolean | `true`ならWebAppsモードで、以下の設定は無視される。デフォルトは`false` |\n| accountName   | string  | ストレージアカウント名。webappsが`false`なら有効                       |\n| accountKey    | string  | ストレージアカウントキー。同上                                         |\n| containerName | string  | BLOBコンテナの名前。同上                                               |\n| containerUri  | string  | BLOBコンテナのURI。同上                                                |\n| prefix1       | string  | Prefix1。同上                                                          |\n| prefix2       | string  | Prefix2。同上                                                          |\n\ncontainerUriが優先される。\n\n### 定義のサンプル\n\nWebAppsモード\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cConfiguration status=\"info\"\u003e\n    \u003cAppenders\u003e\n        \u003cAzureBlobAppender name=\"azureblob\" webapps=\"true\"\u003e\n            \u003cPatternLayout pattern=\"[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n\" /\u003e\n        \u003c/AzureBlobAppender\u003e\n    \u003c/Appenders\u003e\n    \u003cLoggers\u003e\n        \u003cRoot level=\"info\"\u003e\n            \u003cAppenderRef ref=\"azureblob\" /\u003e\n        \u003c/Root\u003e\n    \u003c/Loggers\u003e\n\u003c/Configuration\u003e\n```\n\n\n一般モード\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cConfiguration status=\"info\"\u003e\n    \u003cAppenders\u003e\n        \u003cAzureBlobAppender name=\"azureblob\" \n                           accountName=\"\u003c\u003cyourstorageaccount\u003e\u003e\u003e\"\n                           accountKey=\"\u003c\u003cyourstorageaccountkey\u003e\u003e\"\n                           containerName=\"\u003c\u003cyourblobstoragecontainername\u003e\u003e\"\n                           containerUri=\"\u003c\u003cyourblobstoragecontaineruri\u003e\u003e\"\n                           prefix1=\"${sys:COMPUTERNAME}\"\n                           prefix2=\"foobar\"\u003e\n            \u003cPatternLayout pattern=\"[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n\" /\u003e\n        \u003c/AzureBlobAppender\u003e\n    \u003c/Appenders\u003e\n    \u003cLoggers\u003e\n        \u003cRoot level=\"info\"\u003e\n            \u003cAppenderRef ref=\"azureblob\" /\u003e\n        \u003c/Root\u003e\n    \u003c/Loggers\u003e\n\u003c/Configuration\u003e\n```\n\n## テスト\n\n`test/resources/azureconfig.json` に値を設定すること。\n\n以上","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-moris%2Flog4j2-azure-blob-appender","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-moris%2Flog4j2-azure-blob-appender","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-moris%2Flog4j2-azure-blob-appender/lists"}