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,29 +29,35 @@ local record Log
OFF: Level
end
local enum ConsoleDestination
local record logging
Level: Level
Append: Append
Log: Log
enum ConsoleDestination
"stdout"
"stderr"
end
end
local record ConsoleParameters
record ConsoleParameters
destination: ConsoleDestination
logPattern: string
logPatterns: { Level: string }
timestampPattern: string
logLevel: Level
end
end
local record FileParameters
record FileParameters
filename: string
datePattern: string
logPattern: string
logPatterns: { Level: string }
timestampPattern: string
logLevel: Level
end
end
local record RollingFileParameters
record RollingFileParameters
filename: string
maxFileSize: number
maxBackupIndex: number
@ -59,19 +65,8 @@ local record RollingFileParameters
logPatterns: { Level: string }
timestampPattern: string
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
_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<FileParameters>
rolling_file: Append<RollingFileParameters>
-- TODO : add more appenders
__types: Types
end
return logging