Skip to content

Commit

Permalink
fix: wrong logging interface
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaslagoni committed Jan 28, 2023
1 parent 9a7a028 commit ff8e156
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions Oxide.Ext.GamingApi/GamingApiNats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ private string GetNatsHost()
var value = Environment.GetEnvironmentVariable(envName);
if (value == null)
{
Console.WriteLine($"NATS: {envName} environment variable not sat using default value.");
this.Logger.Info($"NATS: {envName} environment variable not sat using default value.");
return "nats://localhost:4222";
}
Console.WriteLine($"NATS: {envName} loading - {value}");
this.Logger.Info($"NATS: {envName} loading - {value}");
return value;
}

Expand All @@ -144,21 +144,21 @@ private string GetNatsAuthenticationType()
var value = Environment.GetEnvironmentVariable(envName);
if (value == null)
{
Console.WriteLine($"NATS: {envName} environment variable not sat using default value.");
this.Logger.Info($"NATS: {envName} environment variable not sat using default value.");
return "jwt";
}
Console.WriteLine($"NATS: {envName} loading - {value}");
this.Logger.Info($"NATS: {envName} loading - {value}");
return value;
}

private string GetNatsNkeyUser()
{
var envName = $"GAMINGAPI_NATS_NKEY_USER";
var value = Environment.GetEnvironmentVariable(envName);
Console.WriteLine($"NATS: {envName} loading");
this.Logger.Info($"NATS: {envName} loading");
if (value == null)
{
Console.WriteLine($"NATS: {envName} environment variable not sat using default value.");
this.Logger.Info($"NATS: {envName} environment variable not sat using default value.");
return "UCNCZJYZY7EHLN64DBIEWJVLJGL5T3JFK7OAUXXCH7XJM337LEVFOSCX";
}
return value;
Expand All @@ -172,16 +172,16 @@ private string GetNatsNkeySeed()
var fileName = Environment.GetEnvironmentVariable(envFileName);
if (fileName != null)
{
Console.WriteLine($"NATS: {envFileName} loading from file");
this.Logger.Info($"NATS: {envFileName} loading from file");
string contents = File.ReadAllText(@fileName);
return contents;
}

var value = Environment.GetEnvironmentVariable(envName);
Console.WriteLine($"NATS: {envName} loading");
this.Logger.Info($"NATS: {envName} loading");
if (value == null)
{
Console.WriteLine($"NATS: {envName} environment variable not sat using default value.");
this.Logger.Info($"NATS: {envName} environment variable not sat using default value.");
return "SUACNAC2QZKPXKLKOE3TM3OPZ45P6VGQDVUPBLMFZEMKFPBBVHMLDOKFCQ";
}
return value;
Expand All @@ -196,16 +196,16 @@ private string GetNatsJwtUser()
var fileName = Environment.GetEnvironmentVariable(envFileName);
if (fileName != null)
{
Console.WriteLine($"NATS: {envFileName} loading from file");
this.Logger.Info($"NATS: {envFileName} loading from file");
string contents = File.ReadAllText(@fileName);
return contents;
}

var value = Environment.GetEnvironmentVariable(envName);
Console.WriteLine($"NATS: {envName} loading");
this.Logger.Info($"NATS: {envName} loading");
if (value == null)
{
Console.WriteLine($"NATS: {envName} environment variable not sat using default value.");
this.Logger.Info($"NATS: {envName} environment variable not sat using default value.");
return "J0eXAiOiJKV1QiLCJhbGciOiJlZDI1NTE5LW5rZXkifQ.eyJqdGkiOiJTWDU1RkYzQ1NTQ1ZXU1lIS0lMQUtJRVZWQlhJVFZTMlJWQTdOWEhNTlJIQUhRNFFWVDdRIiwiaWF0IjoxNjczMTU3ODQ2LCJpc3MiOiJBQk9OUEpWTkI3UzRZTFpKUTVUWkNZRzVKWkQ2T09CRFIyNlVUVzZUSFg3T1dDVVNFU1pSUkhGRiIsIm5hbWUiOiJydXN0X3NlcnZlciIsInN1YiI6IlVDRVJWT1hRMlFGNkRBWEdDNVZNUDJYWEczWTVJQjdBN1RGQ1hFTEVHT1ZXRTRHV0lFRkNRSzZXIiwibmF0cyI6eyJwdWIiOnsiYWxsb3ciOlsidjAucnVzdC5zZXJ2ZXJzLlx1MDAzZSJdfSwic3ViIjp7ImFsbG93IjpbIl9JTkJPWC5cdTAwM2UiXX0sInJlc3AiOnsibWF4IjoxLCJ0dGwiOjB9LCJzdWJzIjotMSwiZGF0YSI6LTEsInBheWxvYWQiOi0xLCJ0eXBlIjoidXNlciIsInZlcnNpb24iOjJ9fQ.VRXdyowAR1Nb8-i0OMyI9jll3hU3kIm7BPIaas-xsJkT0eD_DhBd2hxEQBtHS8cCqp7M9SwYYKL-wIb6baOjAw";
}
return value;
Expand All @@ -217,7 +217,7 @@ private string GetNatsJwtSeed()
var value = Environment.GetEnvironmentVariable(envName);
if (value == null)
{
Console.WriteLine($"NATS: {envName} environment variable not sat using default value.");
this.Logger.Info($"NATS: {envName} environment variable not sat using default value.");
return "SUAIDAQVH67GXNFUALIVHFKC24SZCFR3BZF3GGHYVQDHVB3CG3GDGVWPUM";
}
return value;
Expand Down

0 comments on commit ff8e156

Please sign in to comment.