本文整理匯總了TypeScript中core/logging.logger.error方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript logger.error方法的具體用法?TypeScript logger.error怎麽用?TypeScript logger.error使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類core/logging.logger
的用法示例。
在下文中一共展示了logger.error方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: initialize
initialize(): void {
super.initialize()
// Validate data_sources match
const data_source_validation = this._check_data_sources_on_renderers()
if (!data_source_validation)
logger.error("Non matching data sources on legend item renderers")
// Validate label in data_source
const field_validation = this._check_field_label_on_data_source()
if (!field_validation)
logger.error(`Bad column name on label: ${this.label}`)
}
示例2: initialize
initialize(): void {
super.initialize()
this.legend = null
this.connect(this.change,
() => { if (this.legend != null) this.legend.item_change.emit() })
// Validate data_sources match
const data_source_validation = this._check_data_sources_on_renderers()
if (!data_source_validation)
logger.error("Non matching data sources on legend item renderers")
// Validate label in data_source
const field_validation = this._check_field_label_on_data_source()
if (!field_validation)
logger.error(`Bad column name on label: ${this.label}`)
}
示例3: initialize
initialize(): void {
super.initialize()
if (!this.api_key)
logger.error("api_key is required. See https://developers.google.com/maps/documentation/javascript/get-api-key for more information on how to obtain your own.")
}
示例4:
xhr.addEventListener("error", () => {
logger.error(`Failed to fetch JSON from ${this.data_url} with code ${xhr.status}`)
})