@process-engine/logging_api_contracts
Advanced tools
Comparing version 0.0.1-7c450668-b3 to 0.0.1-9465bdbc-b6
@@ -0,8 +1,49 @@ | ||
import { IIdentity } from '@essential-projects/iam_contracts'; | ||
import { LogEntry } from './log_entry'; | ||
import { LogLevel } from './log_level'; | ||
import { IIdentity } from '@essential-projects/iam_contracts'; | ||
/** | ||
* Contains functions for writing and retrieving content from logfiles. | ||
* Each logfile relates to a specific process model and correlation. | ||
*/ | ||
export interface ILoggingService { | ||
/** | ||
* Retrieves the logs for a specific correlation. | ||
* | ||
* @param identity The identity of the requesting user. | ||
* @param correlationId The id of the correlation for which to retrieve the logs. | ||
* @param logLevel Optional: If set, only logs with a matching log level are returned. | ||
* If not set, all logs will be returned. | ||
* @returns A list of log entries. | ||
*/ | ||
getLogsForCorrelation(identity: IIdentity, correlationId: string, logLevel?: LogLevel): Array<LogEntry>; | ||
/** | ||
* Retrieves the logs for a specific process model of a given correlation. | ||
* | ||
* @param identity The identity of the requesting user. | ||
* @param processModelId The id of process model for which to retrieve the logs. | ||
* @param correlationId The id of the correlation for which to retrieve the logs. | ||
* @param logLevel Optional: If set, only logs with a matching log level are returned. | ||
* If not set, all logs will be returned. | ||
* @returns A list of log entries. | ||
*/ | ||
getLogsForProcessInstance(identity: IIdentity, processModelId: string, correlationId: string, logLevel?: LogLevel): Array<LogEntry>; | ||
/** | ||
* Writes a log entry for a specific process model of a correlation. | ||
* | ||
* @param processModelId The id of process model for which to create a log entry. | ||
* @param correlationId The id of the correlation to which the process model belongs. | ||
* @param logLevel The loglevel to use (debug, info, warning, error). | ||
* @param message The message to write into the log entry. | ||
*/ | ||
writeLogForProcessModel(processModelId: string, correlationId: string, logLevel: LogLevel, message: string): Promise<void>; | ||
/** | ||
* Writes a log entry for a specific flow node instance of a process model within a correlation. | ||
* | ||
* @param processModelId The id of process model to which the flow node instance belongs. | ||
* @param correlationId The id of the correlation to which the process model belongs. | ||
* @param flowNodeInstanceId The id of flow node instance for which to create a log entry. | ||
* @param logLevel The loglevel to use (debug, info, warning, error). | ||
* @param message The message to write into the log entry. | ||
*/ | ||
writeLogForFlowNodeInstance(processModelId: string, correlationId: string, flowNodeInstanceId: string, logLevel: LogLevel, message: string): Promise<void>; | ||
} |
import { LogLevel } from './log_level'; | ||
/** | ||
* Describes a single log entry. | ||
*/ | ||
export declare class LogEntry { | ||
/** | ||
* The id of the process model to which the log entry pertains. | ||
*/ | ||
processModelId: string; | ||
/** | ||
* The id of the correlation to which the log entry pertains. | ||
*/ | ||
correlationId: string; | ||
/** | ||
* The id of the flow node instance to which the log entry pertains. | ||
*/ | ||
flowNodeInstanceId?: string; | ||
/** | ||
* The log level. | ||
*/ | ||
logLevel: LogLevel; | ||
/** | ||
* The log message. | ||
*/ | ||
message: string; | ||
/** | ||
* The date and time at which the log entry was recorded.. | ||
*/ | ||
timeStamp: Date; | ||
} |
@@ -0,1 +1,4 @@ | ||
/** | ||
* Contains a list of possible log levels. | ||
*/ | ||
export declare enum LogLevel { | ||
@@ -2,0 +5,0 @@ debug = 1, |
{ | ||
"name": "@process-engine/logging_api_contracts", | ||
"version": "0.0.1-7c450668-b3", | ||
"version": "0.0.1-9465bdbc-b6", | ||
"description": "the api-package for process-engine logging", | ||
@@ -5,0 +5,0 @@ "main": "dist/commonjs/index.js", |
@@ -0,9 +1,54 @@ | ||
import {IIdentity} from '@essential-projects/iam_contracts'; | ||
import {LogEntry} from './log_entry'; | ||
import {LogLevel} from './log_level'; | ||
import {IIdentity} from '@essential-projects/iam_contracts'; | ||
/** | ||
* Contains functions for writing and retrieving content from logfiles. | ||
* Each logfile relates to a specific process model and correlation. | ||
*/ | ||
export interface ILoggingService { | ||
export interface ILoggingService { | ||
/** | ||
* Retrieves the logs for a specific correlation. | ||
* | ||
* @param identity The identity of the requesting user. | ||
* @param correlationId The id of the correlation for which to retrieve the logs. | ||
* @param logLevel Optional: If set, only logs with a matching log level are returned. | ||
* If not set, all logs will be returned. | ||
* @returns A list of log entries. | ||
*/ | ||
getLogsForCorrelation(identity: IIdentity, correlationId: string, logLevel?: LogLevel): Array<LogEntry>; | ||
/** | ||
* Retrieves the logs for a specific process model of a given correlation. | ||
* | ||
* @param identity The identity of the requesting user. | ||
* @param processModelId The id of process model for which to retrieve the logs. | ||
* @param correlationId The id of the correlation for which to retrieve the logs. | ||
* @param logLevel Optional: If set, only logs with a matching log level are returned. | ||
* If not set, all logs will be returned. | ||
* @returns A list of log entries. | ||
*/ | ||
getLogsForProcessInstance(identity: IIdentity, processModelId: string, correlationId: string, logLevel?: LogLevel): Array<LogEntry>; | ||
/** | ||
* Writes a log entry for a specific process model of a correlation. | ||
* | ||
* @param processModelId The id of process model for which to create a log entry. | ||
* @param correlationId The id of the correlation to which the process model belongs. | ||
* @param logLevel The loglevel to use (debug, info, warning, error). | ||
* @param message The message to write into the log entry. | ||
*/ | ||
writeLogForProcessModel(processModelId: string, correlationId: string, logLevel: LogLevel, message: string): Promise<void>; | ||
/** | ||
* Writes a log entry for a specific flow node instance of a process model within a correlation. | ||
* | ||
* @param processModelId The id of process model to which the flow node instance belongs. | ||
* @param correlationId The id of the correlation to which the process model belongs. | ||
* @param flowNodeInstanceId The id of flow node instance for which to create a log entry. | ||
* @param logLevel The loglevel to use (debug, info, warning, error). | ||
* @param message The message to write into the log entry. | ||
*/ | ||
writeLogForFlowNodeInstance(processModelId: string, | ||
@@ -10,0 +55,0 @@ correlationId: string, |
import {LogLevel} from './log_level'; | ||
/** | ||
* Describes a single log entry. | ||
*/ | ||
export class LogEntry { | ||
/** | ||
* The id of the process model to which the log entry pertains. | ||
*/ | ||
public processModelId: string; | ||
/** | ||
* The id of the correlation to which the log entry pertains. | ||
*/ | ||
public correlationId: string; | ||
/** | ||
* The id of the flow node instance to which the log entry pertains. | ||
*/ | ||
public flowNodeInstanceId?: string; | ||
/** | ||
* The log level. | ||
*/ | ||
public logLevel: LogLevel; | ||
/** | ||
* The log message. | ||
*/ | ||
public message: string; | ||
/** | ||
* The date and time at which the log entry was recorded.. | ||
*/ | ||
public timeStamp: Date; | ||
} |
@@ -0,1 +1,4 @@ | ||
/** | ||
* Contains a list of possible log levels. | ||
*/ | ||
export enum LogLevel { | ||
@@ -2,0 +5,0 @@ debug = 1, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
18583
250