@prefecthq/prefect-ui-library
Version:
This library is the Vue and Typescript component library for [Prefect 2](https://github.com/PrefectHQ/prefect) and [Prefect Cloud 2](https://www.prefect.io/cloud/). _The components and utilities in this project are not meant to be used independently_.
44 lines (39 loc) • 1.02 kB
text/typescript
export const logLevel = [0, 10, 20, 30, 40, 50] as const
export type LogLevel = typeof logLevel[number]
export interface ILog {
id: string,
created: Date,
updated: Date,
name: string,
level: LogLevel,
message: string,
timestamp: Date,
flowRunId: string,
taskRunId: string | null,
workerId: string | null,
}
export class Log implements ILog {
public readonly id: string
public readonly created: Date
public readonly updated: Date
public readonly kind = 'log'
public name: string
public level: LogLevel
public message: string
public timestamp: Date
public flowRunId: string
public taskRunId: string | null
public workerId: string | null
public constructor(log: ILog) {
this.id = log.id
this.created = log.created
this.updated = log.updated
this.name = log.name
this.level = log.level
this.message = log.message
this.timestamp = log.timestamp
this.flowRunId = log.flowRunId
this.taskRunId = log.taskRunId
this.workerId = log.workerId
}
}