createLogger(my-custom-component)
関連情報を特定のコンポーネントにログを記録するのに役立つ、サードパーティ製ウィジェット用のロガーを初期化します。ログのタイプによって異なる方法が使用されます。情報、警告、エラーなどのメッセージは、ブラウザのコンソールに記録されます。
例
const logerOne = Desktop.logger.createLogger("my-custom-component-one");
const logerTwo = Desktop.logger.createLogger("my-custom-component-two");
logerOne.info("Info test"); // console.log => "my-custom-component: Info:test"
logerTwo.warn("Warn test"); // console.log => "my-custom-component: Warn:test"
logerOne.error("Error test"); // console.log => "my-custom-component: Error:test"
パラメータ
名前 |
タイプ |
説明 |
必須 |
---|---|---|---|
my-custom-component |
文字列 |
コンポーネントの名前。例:電子メールコンポーネント、チャットコンポーネント。 |
はい |