言語ランタイムの設定
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
多くのプログラミング言語には標準のログ書き込みインターフェースがあり、Logging を使用するよう再構成できます。
ログの書き込み
Logging にログを書き込むには、次のいずれかを行います。
VM インスタンスの syslog
などの既存のログファイルにログを書き込みます。Logging エージェントによって、Google Cloud のオペレーション スイートにログが送信されます。
詳細については、エージェントについてをご覧ください。
書き込むログを Logging に送信するように、標準のロギング パッケージを構成します。詳細については、次の詳細ページをご覧ください。
使用しているプログラミング言語用の Logging のクライアント ライブラリを使用して Logging API を呼び出します。
Logging API REST エンドポイントを直接呼び出します。Logging API のリファレンス ドキュメントをご覧ください。
gcloud CLI を使用します。詳細については、gcloud logging コマンドライン インターフェースをご覧ください。
ログの読み取り
Logging でログエントリを読み取るには、次のいずれかを行います。
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 2022-11-25 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"わかりにくい"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"情報またはサンプルコードが不正確"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"必要な情報 / サンプルがない"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻訳に関する問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"その他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"わかりやすい"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"問題の解決に役立った"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"その他"
}]