Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 0 additions & 87 deletions Source/ACE.Common/Logging/LogExtensions.cs

This file was deleted.

6 changes: 3 additions & 3 deletions Source/ACE.DatLoader/DatDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public DatReader GetReaderForFile(uint fileId)
//log.DebugFormat("Unable to find object_id {0:X8} in {1}", fileId, Enum.GetName(typeof(DatDatabaseType), Header.DataSet));
}
else
log.InfoFormat("Unable to find object_id {0:X8} in {1}", fileId, Enum.GetName(typeof(DatDatabaseType), Header.DataSet));
log.LogInformation("Unable to find object_id {FileId:X8} in {Name}", fileId, Enum.GetName(typeof(DatDatabaseType), Header.DataSet));

return null;
}
Expand Down Expand Up @@ -157,12 +157,12 @@ private int GetTotalIterations()
if (iteration.TotalIterations > 0)
{
if (iteration.Ints.Count > 1)
log.Error($"{FilePath} contains an incomplete dat file!");
log.LogError("{FilePath} contains an incomplete dat file!", FilePath);
return iteration.TotalIterations;
}
else
{
log.Error($"Unable to read iteration from {FilePath}");
log.LogError("Unable to read iteration from {FilePath}", FilePath);
return 0;
}
}
Expand Down
28 changes: 14 additions & 14 deletions Source/ACE.DatLoader/DatManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ public static void Initialize(string datFileDirectory, bool keepOpen = false, bo
datFile = Path.Combine(datDir, "client_cell_1.dat");
CellDat = new CellDatDatabase(datFile, keepOpen);
count = CellDat.AllFiles.Count;
log.Info($"Successfully opened {datFile} file, containing {count} records, iteration {CellDat.Iteration}");
log.LogInformation("Successfully opened {DatFile} file, containing {Count} records, iteration {Iteration}", datFile, count, CellDat.Iteration);
if (CellDat.Iteration != ITERATION_CELL)
log.Warn($"{datFile} iteration does not match expected end-of-retail version of {ITERATION_CELL}.");
log.LogWarning("{DatFile} iteration does not match expected end-of-retail version of {ITERATION_CELL}.", datFile, ITERATION_CELL);
}
catch (FileNotFoundException ex)
{
log.Error($"An exception occured while attempting to open {datFile} file! This needs to be corrected in order for Landblocks to load!");
log.Error($"Exception: {ex.Message}");
log.LogError("An exception occured while attempting to open {DatFile} file! This needs to be corrected in order for Landblocks to load!", datFile);
log.LogError("Exception: {Message}", ex.Message);
}
}

Expand All @@ -53,14 +53,14 @@ public static void Initialize(string datFileDirectory, bool keepOpen = false, bo
PortalDat = new PortalDatDatabase(datFile, keepOpen);
PortalDat.SkillTable.AddRetiredSkills();
count = PortalDat.AllFiles.Count;
log.Info($"Successfully opened {datFile} file, containing {count} records, iteration {PortalDat.Iteration}");
log.LogInformation("Successfully opened {DatFile} file, containing {Count} records, iteration {Iteration}", datFile, count, PortalDat.Iteration);
if (PortalDat.Iteration != ITERATION_PORTAL)
log.Warn($"{datFile} iteration does not match expected end-of-retail version of {ITERATION_PORTAL}.");
log.LogWarning("{DatFile} iteration does not match expected end-of-retail version of {ITERATION_PORTAL}.", datFile, ITERATION_PORTAL);
}
catch (FileNotFoundException ex)
{
log.Error($"An exception occured while attempting to open {datFile} file!\n\n *** Please check your 'DatFilesDirectory' setting in the config.js file. ***\n *** ACE will not run properly without this properly configured! ***\n");
log.Error($"Exception: {ex.Message}");
log.LogError("An exception occured while attempting to open {DatFile} file!\n\n *** Please check your 'DatFilesDirectory' setting in the config.js file. ***\n *** ACE will not run properly without this properly configured! ***\n", datFile);
log.LogError("Exception: {Message}", ex.Message);
}

// Load the client_highres.dat file. This is not required for ACE operation, so no exception needs to be generated.
Expand All @@ -69,24 +69,24 @@ public static void Initialize(string datFileDirectory, bool keepOpen = false, bo
{
HighResDat = new DatDatabase(datFile, keepOpen);
count = HighResDat.AllFiles.Count;
log.Info($"Successfully opened {datFile} file, containing {count} records, iteration {HighResDat.Iteration}");
log.LogInformation("Successfully opened {DatFile} file, containing {Count} records, iteration {Iteration}", datFile, count, HighResDat.Iteration);
if (HighResDat.Iteration != ITERATION_HIRES)
log.Warn($"{datFile} iteration does not match expected end-of-retail version of {ITERATION_HIRES}.");
log.LogWarning("{DatFile} iteration does not match expected end-of-retail version of {ITERATION_HIRES}.", datFile, ITERATION_HIRES);
}

try
{
datFile = Path.Combine(datDir, "client_local_English.dat");
LanguageDat = new LanguageDatDatabase(datFile, keepOpen);
count = LanguageDat.AllFiles.Count;
log.Info($"Successfully opened {datFile} file, containing {count} records, iteration {LanguageDat.Iteration}");
log.LogInformation("Successfully opened {DatFile} file, containing {Count} records, iteration {Iteration}", datFile, count, LanguageDat.Iteration);
if(LanguageDat.Iteration != ITERATION_LANGUAGE)
log.Warn($"{datFile} iteration does not match expected end-of-retail version of {ITERATION_LANGUAGE}.");
log.LogWarning("{DatFile} iteration does not match expected end-of-retail version of {ITERATION_LANGUAGE}.", datFile, ITERATION_LANGUAGE);
}
catch (FileNotFoundException ex)
{
log.Error($"An exception occured while attempting to open {datFile} file!\n\n *** Please check your 'DatFilesDirectory' setting in the config.json file. ***\n *** ACE will not run properly without this properly configured! ***\n");
log.Error($"Exception: {ex.Message}");
log.LogError("An exception occured while attempting to open {DatFile} file!\n\n *** Please check your 'DatFilesDirectory' setting in the config.json file. ***\n *** ACE will not run properly without this properly configured! ***\n", datFile);
log.LogError("Exception: {Message}", ex.Message);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Source/ACE.DatLoader/Entity/AnimationHook.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public static AnimationHook ReadHook(BinaryReader reader)
break;

default:
log.Warn($"Not Implemented Hook type encountered: {hookType}");
log.LogWarning("Not Implemented Hook type encountered: {HookType}", hookType);
hook = null;
break;
}
Expand Down
4 changes: 2 additions & 2 deletions Source/ACE.Database/AuthenticationDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ public bool Exists(bool retryUntilFound)
{
if (((RelationalDatabaseCreator)context.Database.GetService<IDatabaseCreator>()).Exists())
{
log.InfoFormat("[DATABASE] Successfully connected to {0} database on {1}:{2}.", config.Database, config.Host, config.Port);
log.LogInformation("[DATABASE] Successfully connected to {Database} database on {Host}:{Port}.", config.Database, config.Host, config.Port);
return true;
}
}

log.Error($"[DATABASE] Attempting to reconnect to {config.Database} database on {config.Host}:{config.Port} in 5 seconds...");
log.LogError("[DATABASE] Attempting to reconnect to {Database} database on {Host}:{Port} in 5 seconds...", config.Database, config.Host, config.Port);

if (retryUntilFound)
Thread.Sleep(5000);
Expand Down
6 changes: 3 additions & 3 deletions Source/ACE.Database/DatabaseManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static void Initialize(bool autoRetry = true)

if (Authentication.GetListofAccountsByAccessLevel(ACE.Entity.Enum.AccessLevel.Admin).Count == 0)
{
log.Warn("Authentication Database does not contain any admin accounts. The next account to be created will automatically be promoted to an Admin account.");
log.LogWarning("Authentication Database does not contain any admin accounts. The next account to be created will automatically be promoted to an Admin account.");
AutoPromoteNextAccountToAdmin = true;
}
else
Expand All @@ -40,15 +40,15 @@ public static void Initialize(bool autoRetry = true)

if (!World.IsWorldDatabaseGuidRangeValid())
{
log.Fatal("World Database contains instance GUIDs outside of static range which will prevent GuidManager from properly assigning GUIDs and can result in GUID exhaustion prematurely.");
log.LogCritical("World Database contains instance GUIDs outside of static range which will prevent GuidManager from properly assigning GUIDs and can result in GUID exhaustion prematurely.");
InitializationFailure = true;
return;
}

var playerWeenieLoadTest = World.GetCachedWeenie("human");
if (playerWeenieLoadTest == null)
{
log.Fatal("World Database does not contain the weenie for human (1). Characters cannot be created or logged into until the missing weenie is restored.");
log.LogCritical("World Database does not contain the weenie for human (1). Characters cannot be created or logged into until the missing weenie is restored.");
InitializationFailure = true;
return;
}
Expand Down
6 changes: 3 additions & 3 deletions Source/ACE.Database/Models/Auth/AccountExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static bool PasswordMatches(this Account account, string password)
}
else // Account password is using SHA512 salt
{
log.DebugFormat("{0} password verified using SHA512 hash/salt, migrating to bcrypt.", account.AccountName);
log.LogDebug("{AccountName} password verified using SHA512 hash/salt, migrating to bcrypt.", account.AccountName);

var input = GetPasswordHash(account, password);

Expand Down Expand Up @@ -79,12 +79,12 @@ private static string GetPasswordHash(string password)

if (workFactor < 4)
{
log.Warn("PasswordHashWorkFactor in config less than minimum value of 4, using 4 and continuing.");
log.LogWarning("PasswordHashWorkFactor in config less than minimum value of 4, using 4 and continuing.");
workFactor = 4;
}
else if (workFactor > 31)
{
log.Warn("PasswordHashWorkFactor in config greater than maximum value of 31, using 31 and continuing.");
log.LogWarning("PasswordHashWorkFactor in config greater than maximum value of 31, using 31 and continuing.");
workFactor = 31;
}

Expand Down
Loading