mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 01:41:56 +02:00
* Some minor improvements
This commit is contained in:
parent
5ac4fd0b13
commit
b18e381049
packages/wasm-utils
@ -6,7 +6,7 @@ uses
|
||||
{$IFDEF UNIX}
|
||||
cthreads,
|
||||
{$ENDIF}
|
||||
SysUtils, Classes, wasm.timer.shared, wasm.timer.api, wasm.logger.api, wasm.timer.objects, wasm.http.api;
|
||||
SysUtils, Classes, wasm.timer.shared, wasm.timer.api, wasm.logger.api, wasm.timer.objects;
|
||||
|
||||
Type
|
||||
|
||||
|
@ -85,7 +85,7 @@ function __wasmhttp_response_callback(aRequestID : TWasmHTTPRequestID; aUserData
|
||||
|
||||
|
||||
procedure __wasmhttp_log(level : TWasmHTTPLogLevel; const Msg : String);
|
||||
procedure __wasmhttp_log(level : TWasmHTTPLogLevel; const Fmt : String; Args : Array of const);
|
||||
procedure __wasmhttp_log(level : TWasmHTTPLogLevel; const Fmt : String; const Args : Array of const);
|
||||
|
||||
var
|
||||
OnWasmHTTPResponse : TWasmHTTPResponseEvent;
|
||||
@ -108,7 +108,7 @@ begin
|
||||
__wasm_log(level,'HTTP',Msg);
|
||||
end;
|
||||
|
||||
procedure __wasmhttp_log(level : TWasmHTTPLogLevel; const Fmt : String; Args : Array of const);
|
||||
procedure __wasmhttp_log(level : TWasmHTTPLogLevel; const Fmt : String; const Args : Array of const);
|
||||
|
||||
begin
|
||||
if not EnableWasmHTTPLog then
|
||||
|
@ -33,14 +33,14 @@ Type
|
||||
TWasmLogHook = procedure (Level : TWasmLogLevel; const Msg : string) of object;
|
||||
|
||||
Const
|
||||
AllLogLevels = [Low(TWasmLogLevel)..High(TWasmLogLevel)];
|
||||
AllWasmLogLevels = [Low(TWasmLogLevel)..High(TWasmLogLevel)];
|
||||
|
||||
var
|
||||
OnWasmLog : TWasmLogHook;
|
||||
WasmLogLevels : TWasmLogLevels = AllLogLevels;
|
||||
WasmLogLevels : TWasmLogLevels = AllWasmLogLevels;
|
||||
|
||||
procedure __wasm_log(level : TWasmLogLevel; const Module, Msg : String);
|
||||
procedure __wasm_log(level : TWasmLogLevel; const Module, Fmt : String; Args : Array of const);
|
||||
procedure __wasm_log(level : TWasmLogLevel; const Module, Fmt : String; const Args : Array of const);
|
||||
|
||||
implementation
|
||||
|
||||
@ -54,7 +54,7 @@ begin
|
||||
OnWasmLog(level,'['+Module+'] '+Msg);
|
||||
end;
|
||||
|
||||
procedure __wasm_log(level : TWasmLogLevel; const Module, Fmt : String; Args : Array of const);
|
||||
procedure __wasm_log(level : TWasmLogLevel; const Module, Fmt : String; const Args : Array of const);
|
||||
|
||||
begin
|
||||
if not (level in WasmLogLevels) then
|
||||
|
@ -81,7 +81,7 @@ Function __wasm_websocket_on_close (aWebsocketID : TWasmWebSocketID; aUserData :
|
||||
|
||||
|
||||
procedure __wasmwebsocket_log(level : TWasmLogLevel; const Msg : String);
|
||||
procedure __wasmwebsocket_log(level : TWasmLogLevel; const Fmt : String; Args : Array of const);
|
||||
procedure __wasmwebsocket_log(level : TWasmLogLevel; const Fmt : String; const Args : Array of const);
|
||||
|
||||
var
|
||||
WebSocketLogEnabled : Boolean;
|
||||
@ -100,7 +100,7 @@ begin
|
||||
__wasm_log(level,'websocket',msg);
|
||||
end;
|
||||
|
||||
procedure __wasmwebsocket_log(level : TWasmWebSocketLogLevel; const Fmt : String; Args : Array of const);
|
||||
procedure __wasmwebsocket_log(level : TWasmWebSocketLogLevel; const Fmt : String; const Args : Array of const);
|
||||
|
||||
begin
|
||||
if not WebSocketLogEnabled then
|
||||
|
Loading…
Reference in New Issue
Block a user