[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"Translation issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
言語ランタイムの設定
多くのプログラミング言語には標準のログ書き込みインターフェースがあり、Logging を使用するよう再構成できます。
ログの書き込み
Logging にログを書き込むには、次のいずれかを行います。
VM インスタンスの syslog
などの既存のログファイルにログを書き込みます。Logging エージェントによって、Google Cloud のオペレーション スイートにログが送信されます。
詳細については、エージェントについてをご覧ください。
書き込むログを Logging に送信するように、標準のロギング パッケージを構成します。詳細については、次の詳細ページをご覧ください。
使用しているプログラミング言語用の Logging のクライアント ライブラリを使用して Logging API を呼び出します。
Logging API REST エンドポイントを直接呼び出します。Logging API のリファレンス ドキュメントをご覧ください。
Cloud SDK を使用します。詳細については、gcloud logging コマンドライン インターフェースをご覧ください。
ログの読み取り
Logging でログエントリを読み取るには、次のいずれかを行います。
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"Translation issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-02-17 UTC.