mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-06-25 07:10:48 -04:00
api and log refactor
This commit is contained in:
parent
f409c84778
commit
c106d324c8
25 changed files with 662 additions and 501 deletions
|
@ -59,7 +59,7 @@ VeilidConfigLogLevel convertToVeilidConfigLogLevel(LogLevel? level) {
|
|||
|
||||
void setRootLogLevel(LogLevel? level) {
|
||||
Loggy('').level = getLogOptions(level);
|
||||
Veilid.instance.changeApiLogLevel(convertToVeilidConfigLogLevel(level));
|
||||
Veilid.instance.changeLogLevel("all", convertToVeilidConfigLogLevel(level));
|
||||
}
|
||||
|
||||
void initLoggy() {
|
||||
|
@ -81,22 +81,26 @@ void main() {
|
|||
logging: VeilidWASMConfigLogging(
|
||||
performance: VeilidWASMConfigLoggingPerformance(
|
||||
enabled: true,
|
||||
level: VeilidLogLevel.trace,
|
||||
level: VeilidConfigLogLevel.debug,
|
||||
logsInTimings: true,
|
||||
logsInConsole: false)));
|
||||
logsInConsole: true),
|
||||
api: VeilidWASMConfigLoggingApi(
|
||||
enabled: true, level: VeilidConfigLogLevel.info)));
|
||||
Veilid.instance.configureVeilidPlatform(platformConfig.json);
|
||||
} else {
|
||||
var platformConfig = VeilidFFIConfig(
|
||||
logging: VeilidFFIConfigLogging(
|
||||
terminal: VeilidFFIConfigLoggingTerminal(
|
||||
enabled: false,
|
||||
level: VeilidLogLevel.trace,
|
||||
level: VeilidConfigLogLevel.debug,
|
||||
),
|
||||
otlp: VeilidFFIConfigLoggingOtlp(
|
||||
enabled: false,
|
||||
level: VeilidLogLevel.trace,
|
||||
level: VeilidConfigLogLevel.trace,
|
||||
grpcEndpoint: "localhost:4317",
|
||||
serviceName: "VeilidExample")));
|
||||
serviceName: "VeilidExample"),
|
||||
api: VeilidFFIConfigLoggingApi(
|
||||
enabled: true, level: VeilidConfigLogLevel.info)));
|
||||
Veilid.instance.configureVeilidPlatform(platformConfig.json);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue