appium-adb
Version:
Android Debug Bridge interface
39 lines • 1.41 kB
TypeScript
import type { ADB } from '../adb';
import type { LogcatOpts, LogEntry, LogcatListener } from './types';
/**
* Start the logcat process to gather logs.
*
* @param opts - Logcat options
* @throws {Error} If restart fails.
*/
export declare function startLogcat(this: ADB, opts?: LogcatOpts): Promise<void>;
/**
* Stop the active logcat process which gathers logs.
* The call will be ignored if no logcat process is running.
*/
export declare function stopLogcat(this: ADB): Promise<void>;
/**
* Retrieve the output from the currently running logcat process.
* The logcat process should be executed by {2link #startLogcat} method.
*
* @return The collected logcat output.
* @throws {Error} If logcat process is not running.
*/
export declare function getLogcatLogs(this: ADB): LogEntry[];
/**
* Set the callback for the logcat output event.
*
* @param listener - Listener function
* @throws {Error} If logcat process is not running.
*/
export declare function setLogcatListener(this: ADB, listener: LogcatListener): void;
/**
* Removes the previously set callback for the logcat output event.
*
* @param listener
* The listener function, which has been previously
* passed to `setLogcatListener`
* @throws {Error} If logcat process is not running.
*/
export declare function removeLogcatListener(this: ADB, listener: LogcatListener): void;
//# sourceMappingURL=logcat-commands.d.ts.map