From 5647ea0b571b9ee191f0672f338734f202ce1838 Mon Sep 17 00:00:00 2001 From: Aire-One Date: Fri, 9 Sep 2022 23:50:39 +0200 Subject: [PATCH] build(types): update lualogging --- types/logging.d.tl | 90 ++++++++++++++++++++-------------------------- 1 file changed, 39 insertions(+), 51 deletions(-) diff --git a/types/logging.d.tl b/types/logging.d.tl index a9aa6f8..4c2d636 100644 --- a/types/logging.d.tl +++ b/types/logging.d.tl @@ -15,11 +15,11 @@ local record Log log: function(self: Log, level: Level, ...: any) getPrint: function(self: Log, level: Level): function(...: any) - debug: function(self: Log, ...: any) - info: function(self: Log, ...: any) - warn: function(self: Log, ...: any) - error: function(self: Log, ...: any) - fatal: function(self: Log, ...: any) + debug: function(self: Log, ...: any) + info: function(self: Log, ...: any) + warn: function(self: Log, ...: any) + error: function(self: Log, ...: any) + fatal: function(self: Log, ...: any) DEBUG: Level INFO: Level @@ -29,49 +29,44 @@ local record Log OFF: Level end -local enum ConsoleDestination - "stdout" - "stderr" -end -local record ConsoleParameters - destination: ConsoleDestination - logPattern: string - logPatterns: { Level: string } - timestampPattern: string - logLevel: Level -end - -local record FileParameters - filename: string - datePattern: string - logPattern: string - logPatterns: { Level: string } - timestampPattern: string - logLevel: Level -end - -local record RollingFileParameters - filename: string - maxFileSize: number - maxBackupIndex: number - logPattern: string - logPatterns: { Level: string } - timestampPattern: string - logLevel: Level -end - -local record Types +local record logging Level: Level Append: Append Log: Log - ConsoleDestination: ConsoleDestination - ConsoleParameters: ConsoleParameters - FileParameters: FileParameters - RollingFileParameters: RollingFileParameters -end -local record logging + enum ConsoleDestination + "stdout" + "stderr" + end + + record ConsoleParameters + destination: ConsoleDestination + logPattern: string + logPatterns: { Level: string } + timestampPattern: string + logLevel: Level + end + + record FileParameters + filename: string + datePattern: string + logPattern: string + logPatterns: { Level: string } + timestampPattern: string + logLevel: Level + end + + record RollingFileParameters + filename: string + maxFileSize: number + maxBackupIndex: number + logPattern: string + logPatterns: { Level: string } + timestampPattern: string + logLevel: Level + end + _COPYRIGHT: string _DESCRIPTION: string _VERSION: string @@ -90,11 +85,6 @@ local record logging defaultLevel: function(level: Level): Level defaultLogger: function(logger: Log): Log - -- undocumented/private APIs - compilePattern: function(pattern: any): function(): string - prepareLogMsg: function(lpattern: string, dpattern: string, level: Level, message: string): string - tostring: function(value: any): string - -- Deprecated getDeprecatedParams: function(lst: table, ...: any) @@ -103,8 +93,6 @@ local record logging file: Append rolling_file: Append -- TODO : add more appenders - - __types: Types end -return logging \ No newline at end of file +return logging