diff --git a/api/@ohos.faultLogger.d.ts b/api/@ohos.faultLogger.d.ts index 887f3a570d1b8b6a9927e69d51355a09fd79eaf9..45a78fecd3ab6b070430f9b89e513496107682e5 100644 --- a/api/@ohos.faultLogger.d.ts +++ b/api/@ohos.faultLogger.d.ts @@ -20,109 +20,120 @@ import { AsyncCallback } from "./basic"; * This module provides the capability to query faultlog data. * * @since 8 - * @sysCap SystemCapability.HiviewDFX.Hiview.FaultLogger - * @devices phone, tablet + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger * @import import sensor from '@ohos.faultlogger' */ declare namespace FaultLogger { /** * The type of fault type. - * @devices phone, tablet - * @sysCap SystemCapability.Sensors.Sensor * @since 8 + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger */ enum FaultType { /** * NO_SPECIFIC log type not distinguished. - * @since 8 + * @since 8 + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger */ NO_SPECIFIC = 0, /** * CPP_CRASH CPP crash log type - * @since 8 + * @since 8 + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger */ CPP_CRASH = 2, /** * JS_CRASH JS crash log type - * @since 8 + * @since 8 + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger */ JS_CRASH = 3, /** * APP_FREEZE app feeeze log type - * @since 8 + * @since 8 + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger */ APP_FREEZE = 4, } /** * Query the result of the current application FaultLog in callback Mode + * @since 8 + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger * @param faultType fault type to query * @param callback faultlog information data callback function - * @since 8 */ function querySelfFaultLog(faultType: FaultType, callback: AsyncCallback>) : void; /** * Query the result of the current application FaultLog in return promise mode. + * @since 8 + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger * @param faultType fault type to query * @return return faultlog information data by promise - * @since 8 */ function querySelfFaultLog(faultType: FaultType) : Promise>; /** * FaultLog information data structure - * @devices phone, tablet - * @sysCap SystemCapability.Sensors.Sensor * @since 8 + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger */ interface FaultLogInfo { /** * pid Process id * @since 8 + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger */ pid: number; /** * uid user id * @since 8 + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger */ uid: number; /** * type fault type * @since 8 + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger */ type: FaultType; /** * second level timestamp * @since 8 + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger */ timestamp: number; /** * reason fault reason * @since 8 + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger */ reason: string; /** * module fault module * @since 8 + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger */ module: string; /** * summary fault summary * @since 8 + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger */ summary: string; /** * fullLog fault log * @since 8 + * @syscap SystemCapability.HiviewDFX.Hiview.FaultLogger */ fullLog: string; }