generated from ubiquity/ts-template
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
226 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,21 @@ | ||
import { SupabaseClient } from "@supabase/supabase-js"; | ||
import { Context } from "probot"; | ||
import { LogLevel, PrettyLogs } from "./pretty-logs.js"; | ||
import { P as PrettyLogs, M as Metadata, L as LogReturn, a as LogLevel } from './pretty-logs-TeMdXxew.js'; | ||
|
||
declare class LogReturn { | ||
logMessage: LogMessage; | ||
metadata?: any; | ||
constructor(logMessage: LogMessage, metadata?: any); | ||
} | ||
type FunctionPropertyNames<T> = { | ||
[K in keyof T]: T[K] extends (...args: any[]) => any ? K : never; | ||
}[keyof T]; | ||
type PublicMethods<T> = Exclude<FunctionPropertyNames<T>, "constructor" | keyof object>; | ||
type LogMessage = { | ||
raw: string; | ||
diff: string; | ||
level: LogLevel; | ||
type: PublicMethods<Logs>; | ||
}; | ||
declare class Logs { | ||
private _supabase; | ||
private _context; | ||
private _maxLevel; | ||
private _queue; | ||
private _concurrency; | ||
private _retryDelay; | ||
private _throttleCount; | ||
private _retryLimit; | ||
static console: PrettyLogs; | ||
private _log; | ||
private _addDiagnosticInformation; | ||
ok(log: string, metadata?: any, postComment?: boolean): LogReturn | null; | ||
info(log: string, metadata?: any, postComment?: boolean): LogReturn | null; | ||
error(log: string, metadata?: any, postComment?: boolean): LogReturn | null; | ||
debug(log: string, metadata?: any, postComment?: boolean): LogReturn | null; | ||
fatal(log: string, metadata?: any, postComment?: boolean): LogReturn | null; | ||
verbose(log: string, metadata?: any, postComment?: boolean): LogReturn | null; | ||
constructor(supabase: SupabaseClient, retryLimit: number, logLevel: LogLevel, context: Context | null); | ||
private _sendLogsToSupabase; | ||
private _processLogs; | ||
private _retryLog; | ||
private _processLogQueue; | ||
private _throttle; | ||
private _addToQueue; | ||
private _save; | ||
static _commentMetaData(metadata: any, level: LogLevel): string; | ||
private _diffColorCommentMessage; | ||
private _postComment; | ||
private _getNumericLevel; | ||
static convertErrorsIntoObjects(obj: any): any; | ||
private _maxLevel; | ||
static console: PrettyLogs; | ||
private _log; | ||
private _addDiagnosticInformation; | ||
ok(log: string, metadata?: Metadata, postComment?: boolean): LogReturn | null; | ||
info(log: string, metadata?: Metadata, postComment?: boolean): LogReturn | null; | ||
error(log: string, metadata?: Metadata, postComment?: boolean): LogReturn | null; | ||
debug(log: string, metadata?: Metadata, postComment?: boolean): LogReturn | null; | ||
fatal(log: string, metadata?: Metadata, postComment?: boolean): LogReturn | null; | ||
verbose(log: string, metadata?: Metadata, postComment?: boolean): LogReturn | null; | ||
constructor(logLevel: LogLevel); | ||
static _commentMetaData(metadata: Metadata, level: LogLevel): string; | ||
private _diffColorCommentMessage; | ||
private _getNumericLevel; | ||
static convertErrorsIntoObjects(obj: unknown): Metadata | unknown; | ||
} | ||
|
||
export { type LogMessage, LogReturn, Logs }; | ||
export { Logs }; |
Oops, something went wrong.