build(types): update lualogging
This commit is contained in:
parent
035ad58748
commit
c427b77cfa
|
@ -15,11 +15,11 @@ local record Log
|
||||||
log: function(self: Log, level: Level, ...: any)
|
log: function(self: Log, level: Level, ...: any)
|
||||||
getPrint: function(self: Log, level: Level): function(...: any)
|
getPrint: function(self: Log, level: Level): function(...: any)
|
||||||
|
|
||||||
debug: function(self: Log, ...: any)
|
debug: function(self: Log, ...: any)
|
||||||
info: function(self: Log, ...: any)
|
info: function(self: Log, ...: any)
|
||||||
warn: function(self: Log, ...: any)
|
warn: function(self: Log, ...: any)
|
||||||
error: function(self: Log, ...: any)
|
error: function(self: Log, ...: any)
|
||||||
fatal: function(self: Log, ...: any)
|
fatal: function(self: Log, ...: any)
|
||||||
|
|
||||||
DEBUG: Level
|
DEBUG: Level
|
||||||
INFO: Level
|
INFO: Level
|
||||||
|
@ -29,49 +29,44 @@ local record Log
|
||||||
OFF: Level
|
OFF: Level
|
||||||
end
|
end
|
||||||
|
|
||||||
local enum ConsoleDestination
|
|
||||||
"stdout"
|
|
||||||
"stderr"
|
|
||||||
end
|
|
||||||
|
|
||||||
local record ConsoleParameters
|
local record logging
|
||||||
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
|
|
||||||
Level: Level
|
Level: Level
|
||||||
Append: Append
|
Append: Append
|
||||||
Log: Log
|
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
|
_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
|
||||||
|
|
Loading…
Reference in New Issue