logError MethodStatic


Log the specified message to the error stream.

logError(category: string, message: string, metaData?: LoggingMetaData): void

Parameter Type Description
category string The category of the message
message string Message to log
LoggingMetaData Optional data for the message

Returns - void



Log the specified error to the error stream.

logError(category: string, error: unknown, metaData?: LoggingMetaData): void

@note For legacy BentleyError exceptions, the special "exceptionType" property will be added as metadata. Otherwise, all enumerable members of the exception are logged as metadata.

Parameter Type Description
category string The category of the message
error unknown Error to log
LoggingMetaData Optional data for the message

Returns - void


Defined in

Last Updated: 12 March, 2026