build(types): update lualogging

This commit is contained in:
Aire-One 2022-09-09 23:50:39 +02:00
parent 035ad58748
commit c427b77cfa
1 changed files with 39 additions and 51 deletions

View File

@ -29,12 +29,18 @@ local record Log
OFF: Level OFF: Level
end end
local enum ConsoleDestination
local record logging
Level: Level
Append: Append
Log: Log
enum ConsoleDestination
"stdout" "stdout"
"stderr" "stderr"
end end
local record ConsoleParameters record ConsoleParameters
destination: ConsoleDestination destination: ConsoleDestination
logPattern: string logPattern: string
logPatterns: { Level: string } logPatterns: { Level: string }
@ -42,7 +48,7 @@ local record ConsoleParameters
logLevel: Level logLevel: Level
end end
local record FileParameters record FileParameters
filename: string filename: string
datePattern: string datePattern: string
logPattern: string logPattern: string
@ -51,7 +57,7 @@ local record FileParameters
logLevel: Level logLevel: Level
end end
local record RollingFileParameters record RollingFileParameters
filename: string filename: string
maxFileSize: number maxFileSize: number
maxBackupIndex: number maxBackupIndex: number
@ -61,17 +67,6 @@ local record RollingFileParameters
logLevel: Level logLevel: Level
end end
local record Types
Level: Level
Append: Append
Log: Log
ConsoleDestination: ConsoleDestination
ConsoleParameters: ConsoleParameters
FileParameters: FileParameters
RollingFileParameters: RollingFileParameters
end
local record logging
_COPYRIGHT: string _COPYRIGHT: string
_DESCRIPTION: string _DESCRIPTION: string
_VERSION: string _VERSION: string
@ -90,11 +85,6 @@ local record logging
defaultLevel: function(level: Level): Level defaultLevel: function(level: Level): Level
defaultLogger: function(logger: Log): Log 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 -- Deprecated
getDeprecatedParams: function(lst: table, ...: any) getDeprecatedParams: function(lst: table, ...: any)
@ -103,8 +93,6 @@ local record logging
file: Append<FileParameters> file: Append<FileParameters>
rolling_file: Append<RollingFileParameters> rolling_file: Append<RollingFileParameters>
-- TODO : add more appenders -- TODO : add more appenders
__types: Types
end end
return logging return logging