mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-10-11 01:58:45 -04:00
set default port to 5150 for veilid-server in config
improve testing fixtures
This commit is contained in:
parent
a1b6da5ab4
commit
55de1dcb5c
6 changed files with 28 additions and 9 deletions
|
@ -112,7 +112,12 @@ class _MyAppState extends State<MyApp> with UiLoggy {
|
|||
Future<void> toggleStartup(bool startup) async {
|
||||
if (startup && !_startedUp) {
|
||||
var config = await getDefaultVeilidConfig(
|
||||
isWeb: kIsWeb, programName: 'Veilid Plugin Example');
|
||||
isWeb: kIsWeb,
|
||||
programName: 'Veilid Plugin Example',
|
||||
// ignore: avoid_redundant_argument_values, do_not_use_environment
|
||||
bootstrap: const String.fromEnvironment('BOOTSTRAP'),
|
||||
// ignore: avoid_redundant_argument_values, do_not_use_environment
|
||||
networkKeyPassword: const String.fromEnvironment('NETWORK_KEY'));
|
||||
// ignore: do_not_use_environment
|
||||
if (const String.fromEnvironment('DELETE_TABLE_STORE') == '1') {
|
||||
config = config.copyWith(
|
||||
|
|
|
@ -11,7 +11,7 @@ void veilidInit() {
|
|||
enabled: true,
|
||||
level: VeilidConfigLogLevel.debug,
|
||||
logsInTimings: true,
|
||||
logsInConsole: false),
|
||||
logsInConsole: true),
|
||||
api: VeilidWASMConfigLoggingApi(
|
||||
enabled: true, level: VeilidConfigLogLevel.info)));
|
||||
Veilid.instance.initializeVeilidCore(platformConfig.toJson());
|
||||
|
|
|
@ -38,20 +38,24 @@ class DefaultVeilidFixture implements VeilidFixture {
|
|||
? <String>[]
|
||||
: ignoreLogTargetsStr.split(',').map((e) => e.trim()).toList();
|
||||
|
||||
final logLevel = VeilidConfigLogLevel.fromJson(
|
||||
// ignore: do_not_use_environment
|
||||
const String.fromEnvironment('LOG_LEVEL', defaultValue: 'info'));
|
||||
|
||||
final Map<String, dynamic> platformConfigJson;
|
||||
if (kIsWeb) {
|
||||
final platformConfig = VeilidWASMConfig(
|
||||
logging: VeilidWASMConfigLogging(
|
||||
performance: VeilidWASMConfigLoggingPerformance(
|
||||
enabled: true,
|
||||
level: VeilidConfigLogLevel.debug,
|
||||
level: logLevel,
|
||||
logsInTimings: true,
|
||||
logsInConsole: false,
|
||||
logsInConsole: true,
|
||||
ignoreLogTargets: ignoreLogTargets,
|
||||
),
|
||||
api: VeilidWASMConfigLoggingApi(
|
||||
enabled: true,
|
||||
level: VeilidConfigLogLevel.info,
|
||||
level: logLevel,
|
||||
ignoreLogTargets: ignoreLogTargets,
|
||||
)));
|
||||
platformConfigJson = platformConfig.toJson();
|
||||
|
@ -72,8 +76,7 @@ class DefaultVeilidFixture implements VeilidFixture {
|
|||
),
|
||||
api: VeilidFFIConfigLoggingApi(
|
||||
enabled: true,
|
||||
// level: VeilidConfigLogLevel.debug,
|
||||
level: VeilidConfigLogLevel.info,
|
||||
level: logLevel,
|
||||
ignoreLogTargets: ignoreLogTargets,
|
||||
)));
|
||||
platformConfigJson = platformConfig.toJson();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue