API Reference > bentleyjs-core > Logging > Logger > logException logException MethodStatic Log the specified exception. The special "ExceptionType" property will be added as metadata, in addition to any other metadata that may be supplied by the caller, unless the metadata supplied by the caller already includes this property. logException(category: string, err: Error, log: LogFunction = Logger.logError, metaData?: GetMetaDataFunction): void Parameter Type Description category string The category of the message. err Error The exception object. log LogFunction The logger output function to use - defaults to Logger.logError metaData GetMetaDataFunction Optional data for the message Returns - void Defined in core/bentley/src/Logger.ts Line 312 Last Updated: 12 June, 2024