UNPKG

@atomist/sdm

Version:

Atomist Software Delivery Machine SDK

33 lines 1.25 kB
import { HandlerContext } from "@atomist/automation-client/lib/HandlerContext"; import { WritableLog } from "@atomist/automation-client/lib/util/child_process"; import { SdmGoalEvent } from "../../api/goal/SdmGoalEvent"; /** * Log abstraction for output of a specific activity. Not intended as a long-running log * but for a short-lived activity. * Not a technical log of this project but a log of meaningful activity * on behalf of users. */ export interface ProgressLog extends WritableLog { /** * Name. Should relate to the immediate activity we're logging. */ readonly name: string; /** * Return the url of the log if it is persisted */ readonly url?: string; flush(): Promise<void>; close(): Promise<void>; /** * Is this logger available at this point in time? * E.g. if it's backed by a service, is that service up? */ isAvailable(): Promise<boolean>; /** Function that appends to the log. */ write(log: string, ...args: any[]): void; } /** * Function to create a ProgressLog for a given goal execution */ export declare type ProgressLogFactory = (context: HandlerContext, sdmGoal: SdmGoalEvent) => Promise<ProgressLog>; //# sourceMappingURL=ProgressLog.d.ts.map