Skip to content

Commit

Permalink
Updates to the main Scene file and Event handlers for logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
mdickson committed Mar 31, 2024
1 parent 3bd7f9c commit 65b9ece
Show file tree
Hide file tree
Showing 5 changed files with 337 additions and 353 deletions.
14 changes: 7 additions & 7 deletions Source/OpenSim.Framework/GridInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,9 @@ public class GridInfo
private string m_DestinationGuideURL = string.Empty;
private string m_economyURL = string.Empty;

private readonly ILogger<GridInfo> m_logger;
private readonly ILogger? m_logger;

public GridInfo (IConfiguration config, ILogger<GridInfo> logger, string defaultURI = "")
public GridInfo (IConfiguration config, ILogger? logger, string defaultURI = "")
{
m_logger = logger;

Expand Down Expand Up @@ -401,7 +401,7 @@ public GridInfo (IConfiguration config, ILogger<GridInfo> logger, string default

if (!m_gateKeeperURL.IsResolvedHost)
{
m_logger.LogError(m_gateKeeperURL.IsValidHost ? "Could not resolve GatekeeperURI" : "GatekeeperURI is a invalid host");
m_logger?.LogError(m_gateKeeperURL.IsValidHost ? "Could not resolve GatekeeperURI" : "GatekeeperURI is a invalid host");
throw new Exception("GatekeeperURI configuration error");
}

Expand Down Expand Up @@ -446,7 +446,7 @@ public GridInfo (IConfiguration config, ILogger<GridInfo> logger, string default

if (!m_homeURL.IsResolvedHost)
{
m_logger.LogError(m_homeURL.IsValidHost ? "Could not resolve HomeURI" : "HomeURI is a invalid host");
m_logger?.LogError(m_homeURL.IsValidHost ? "Could not resolve HomeURI" : "HomeURI is a invalid host");
throw new Exception("HomeURI configuration error");
}

Expand Down Expand Up @@ -483,7 +483,7 @@ public GridInfo (IConfiguration config, ILogger<GridInfo> logger, string default
tmpuri = new OSHTTPURI(m_SearchURL.Trim(), true);
if (!tmpuri.IsResolvedHost)
{
m_logger.LogError(tmpuri.IsValidHost ? "Could not resolve SearchServerURI" : "SearchServerURI is a invalid host");
m_logger?.LogError(tmpuri.IsValidHost ? "Could not resolve SearchServerURI" : "SearchServerURI is a invalid host");
throw new Exception("SearchServerURI configuration error");
}
m_SearchURL = tmpuri.URI;
Expand All @@ -499,7 +499,7 @@ public GridInfo (IConfiguration config, ILogger<GridInfo> logger, string default
tmpuri = new OSHTTPURI(m_DestinationGuideURL.Trim(), true);
if (!tmpuri.IsResolvedHost)
{
m_logger.LogError(tmpuri.IsValidHost ? "Could not resolve DestinationGuideURL" : "DestinationGuideURL is a invalid host");
m_logger?.LogError(tmpuri.IsValidHost ? "Could not resolve DestinationGuideURL" : "DestinationGuideURL is a invalid host");
throw new Exception("DestinationGuideURL configuration error");
}
m_DestinationGuideURL = tmpuri.URI;
Expand All @@ -511,7 +511,7 @@ public GridInfo (IConfiguration config, ILogger<GridInfo> logger, string default
tmpuri = new OSHTTPURI(m_economyURL.Trim(), true);
if (!tmpuri.IsResolvedHost)
{
m_logger.LogError(tmpuri.IsValidHost ? "Could not resolve economyURL" : "economyURL is a invalid host");
m_logger?.LogError(tmpuri.IsValidHost ? "Could not resolve economyURL" : "economyURL is a invalid host");
throw new Exception("economyURL configuration error");
}
m_economyURL = tmpuri.URI;
Expand Down
Loading

0 comments on commit 65b9ece

Please sign in to comment.