Skip to content

Commit

Permalink
Set default filter level on uniFFI bindings tests
Browse files Browse the repository at this point in the history
  • Loading branch information
erdemyerebasmaz committed Nov 6, 2024
1 parent 6c6118d commit 32aef81
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion libs/sdk-bindings/bindings-csharp/test/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
try
{
var seed = BreezSdkMethods.MnemonicToSeed("repeat hawk combine screen network rhythm ritual social neither casual volcano powder");
BreezSdkMethods.SetLogStream(new LogStreamListener());
BreezSdkMethods.SetLogStream(new LogStreamListener(), LevelFilter.TRACE);
var config = BreezSdkMethods.DefaultConfig(EnvironmentType.PRODUCTION, "code", new NodeConfig.Greenlight(new GreenlightNodeConfig(null, null)));
var connectRequest = new ConnectRequest(config, seed);
BlockingBreezServices sdkServices = BreezSdkMethods.Connect(connectRequest, new SDKListener());
Expand Down
2 changes: 1 addition & 1 deletion libs/sdk-bindings/tests/bindings/csharp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
try
{
var seed = BreezSdkMethods.MnemonicToSeed("repeat hawk combine screen network rhythm ritual social neither casual volcano powder");
BreezSdkMethods.SetLogStream(new LogStreamListener());
BreezSdkMethods.SetLogStream(new LogStreamListener(), LevelFilter.TRACE);
var config = BreezSdkMethods.DefaultConfig(EnvironmentType.PRODUCTION, "code", new NodeConfig.Greenlight(new GreenlightNodeConfig(null, null)));
var connectRequest = new ConnectRequest(config, seed);
BlockingBreezServices sdkServices = BreezSdkMethods.Connect(connectRequest, new SDKListener());
Expand Down
4 changes: 3 additions & 1 deletion libs/sdk-bindings/tests/bindings/golang/test_breez_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ func (BreezListener) OnEvent(e breez_sdk.BreezEvent) {
func main() {
breezListener := BreezListener{}

breez_sdk.SetLogStream(breezListener, breez_sdk.LevelFilterTrace)
filterLevel := breez_sdk.LevelFilterTrace

breez_sdk.SetLogStream(breezListener, &filterLevel)

seed, err := breez_sdk.MnemonicToSeed("repeat hawk combine screen network rhythm ritual social neither casual volcano powder")

Expand Down
2 changes: 1 addition & 1 deletion libs/sdk-bindings/tests/bindings/test_breez_sdk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
try
{
var seed = BreezSdkMethods.MnemonicToSeed("repeat hawk combine screen network rhythm ritual social neither casual volcano powder");
BreezSdkMethods.SetLogStream(new LogStreamListener());
BreezSdkMethods.SetLogStream(new LogStreamListener(), LevelFilter.TRACE);
var config = BreezSdkMethods.DefaultConfig(EnvironmentType.PRODUCTION, "code", new NodeConfig.Greenlight(new GreenlightNodeConfig(null, null)));
var connectRequest = new ConnectRequest(config, seed);
BlockingBreezServices sdkServices = BreezSdkMethods.Connect(connectRequest, new SDKListener());
Expand Down
2 changes: 1 addition & 1 deletion libs/sdk-bindings/tests/bindings/test_breez_sdk.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class LogStreamListener: breez_sdk.LogStream {
}

try {
breez_sdk.setLogStream(LogStreamListener());
breez_sdk.setLogStream(LogStreamListener(), breez_sdk.LevelFilter.trace);
var seed = breez_sdk.mnemonicToSeed("repeat hawk combine screen network rhythm ritual social neither casual volcano powder");
var config = breez_sdk.defaultConfig(breez_sdk.EnvironmentType.PRODUCTION, "code", breez_sdk.NodeConfig.Greenlight(breez_sdk.GreenlightNodeConfig(null, null)))
var connectRequest = breez_sdk.ConnectRequest(config, seed)
Expand Down
2 changes: 1 addition & 1 deletion libs/sdk-bindings/tests/bindings/test_breez_sdk.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class LogStreamListener: LogStream {
}

do {
try setLogStream(logStream: LogStreamListener());
try setLogStream(logStream: LogStreamListener(), filterLevel: LevelFilter.trace);
let seed = try mnemonicToSeed(phrase: "repeat hawk combine screen network rhythm ritual social neither casual volcano powder");
let config = breez_sdk.defaultConfig(envType: EnvironmentType.production, apiKey: "code", nodeConfig: NodeConfig.greenlight(config: GreenlightNodeConfig(partnerCredentials: nil, inviteCode: nil)));
let connectRequest = ConnectRequest(config: config, seed: seed)
Expand Down

0 comments on commit 32aef81

Please sign in to comment.