> For the complete documentation index, see [llms.txt](https://docs.scepman.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scepman.com/ja/scepman-gou-cheng/application-settings/logging.md).

# ログ

{% hint style="info" %}
バージョン 2.4 以降に適用
{% endhint %}

## AppConfig:LoggingConfig:WorkspaceId

*Linux: AppConfig\_\_LoggingConfig\_\_WorkspaceId*

**値:** GUID

**説明:**

Log Analytics Workspace の Workspace ID（ワークスペースの概要に表示されます）。Azure Monitor とともに使用する場合に必要な設定です。 [SharedKey](#appconfig-loggingconfig-sharedkey).

{% hint style="warning" %}
このログ記録方法は非推奨であり、Microsoft はこのログ記録 API を廃止すると発表しています。代わりに AppConfig:LoggingConfig:DataCollectionEndpointUri と AppConfig:LoggingConfig:RuleId に切り替えてください。次の記事で説明されているとおり、 [ログ管理](/ja/azure-gou-cheng/log-configuration.md) 記事。
{% endhint %}

## AppConfig:LoggingConfig:SharedKey

*Linux: AppConfig\_\_LoggingConfig\_\_SharedKey*

**値:** 文字列

**説明:**

Log Analytics Workspace の 2 つのキーのいずれかを使用します。portal.azure.com で Log Analytics Workspace にアクセスし、Settings/Agents に移動すると表示されます。そこで「Log Analytics agent instructions」セクションを展開できます。プライマリ キーまたはセカンダリ キーのいずれかを使用してください。

Azure Monitor を使用する場合、WorkspaceId とあわせて必須の設定です。

{% hint style="warning" %}
このログ記録方法は非推奨であり、Microsoft はこのログ記録 API を廃止すると発表しています。代わりに AppConfig:LoggingConfig:DataCollectionEndpointUri と AppConfig:LoggingConfig:RuleId に切り替えてください。次の記事で説明されているとおり、 [ログ管理](/ja/azure-gou-cheng/log-configuration.md) 記事。
{% endhint %}

{% hint style="info" %}
SCEPman Certificate Master は、SCEPman コア コンポーネントと同じ方法で構成値を Key Vault に保存することをサポートしていません。ただし、App Service の設定を Key Vault に保存する一般的な方法はあり、 [Mika Berglund](https://mikaberglund.com/store-your-app-service-configuration-settings-in-azure-key-vault/) 彼のブログで説明しています。要するに、Certificate Master のマネージド ID に Secrets-Get 権限を追加する必要があり、SharedKey には次を使用します。 `@Microsoft.KeyVault(SecretUri=https://YOURKEYVAULTNAMEHERE.vault.azure.net/secrets/appconfig--loggingconfig--sharedkey/)` AppConfig:LoggingConfig:SharedKey の値として。
{% endhint %}

## AppConfig:LoggingConfig:DataCollectionEndpointUri

*Linux: AppConfig\_\_LoggingConfig\_\_DataCollectionEndpointUri*

**値:** 文字列

**説明:**

AppConfig:LoggingConfig:RuleId と組み合わせて、App Service のマネージド ID で認証しながら Log Analytics Workspace にログ記録するために使用します。

これは Azure Monitor の Data Collection Endpoint (DCE) の URI です。

## AppConfig:LoggingConfig:RuleId

*Linux: AppConfig\_\_LoggingConfig\_\_RuleId*

**Value**: 文字列

**説明:**

AppConfig:LoggingConfig:DataCollectionEndpointUri と組み合わせて、App Service のマネージド ID で認証しながら Log Analytics Workspace にログ記録するために使用します。

この設定は、Data Collection Rule (DCR) リソースの不変の ID です。

DCR にログ記録する App Service のマネージド ID には、次のロールが割り当てられている必要があります。 *Monitoring Metrics Publisher* のロールです。

通常、この設定を手動で構成することはありません。SCEPman PS Module または Terraform Module が代わりに設定し、DCR と DCE を作成するときに必要なロールも自動的に割り当てるためです。

## AppConfig:LoggingConfig:AzureOfferingDomain

*Linux: AppConfig\_\_LoggingConfig\_\_AzureOfferingDomain*

**値:** 文字列

**説明:**

ワークスペースがグローバル Azure クラウドにない場合は、ここでオファリング ドメインを構成できます。既定値は 'azure.com' です。

{% hint style="danger" %}
変更はサービスに悪影響を及ぼす可能性があります！
{% endhint %}

## AppConfig:LoggingConfig:LogLevel

*Linux: AppConfig\_\_LoggingConfig\_\_LogLevel*

**値:** Trace, Debug, Info, Warn, Error, Fatal

**説明:**

記録される最小のログ レベルです。既定値は 'Info' です。構成されたログ レベル以上のログ レベルを持つログ エントリのみが記録されます。

この設定を 'Trace' または 'Debug' にすると、ログ出力に UPN やユーザーの IP アドレスなどの個人データが含まれる可能性があることに注意してください。ログ出力に個人データを含めたくない場合は、この設定を 'Info' 以上にしてください。

## AppConfig:LoggingConfig:AzureEventHubConnectionString

*Linux: AppConfig\_\_LoggingConfig\_\_AzureEventHubConnectionString*

{% hint style="info" %}
Azure Event Hub へのログ記録は、バージョン 2.7 以降で可能です
{% endhint %}

**値:** 文字列

**説明:**

Azure Event Hub への接続文字列です。Azure Event Hub を使用する場合は必須の設定です。

## AppConfig:LoggingConfig:AzureEventHubName

*Linux: AppConfig\_\_LoggingConfig\_\_AzureEventHubName*

{% hint style="info" %}
Azure Event Hub へのログ記録は、バージョン 2.7 以降で可能です
{% endhint %}

**値:** 文字列

**説明:**

Azure Event Hub の名前です。Azure Event Hub を使用する場合は必須の設定です。

## AppConfig:LoggingConfig:AzureEventHubPartitionKey

*Linux: AppConfig\_\_LoggingConfig\_\_AzureEventHubPartitionKey*

{% hint style="info" %}
Azure Event Hub へのログ記録は、バージョン 2.7 以降で可能です
{% endhint %}

**値:** 文字列

**説明:**

Azure Event Hub のパーティション キーです。これは省略可能です。設定しない場合、既定値は '0' になります。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.scepman.com/ja/scepman-gou-cheng/application-settings/logging.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
