Merge pull request #383 from tr4wzified/master

Fix typos + inconsistencies in logs
This commit is contained in:
Timothy Baldridge 2020-01-14 05:36:55 -08:00 committed by GitHub
commit 880ab875dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 92 additions and 66 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 KiB

View File

@ -110,7 +110,7 @@
<ul>
<li>ESP cleaning</li>
<li>form 44 conversion</li>
<li>Form 44 conversion</li>
<li>ESP to ESL conversion</li>

View File

@ -41,7 +41,7 @@ namespace Wabbajack.BuildServer
continue;
}
Logger.Log(LogLevel.Information, $"Starting Job: {job.Payload.Description}");
Logger.Log(LogLevel.Information, $"Starting job: {job.Payload.Description}");
JobResult result;
try
{
@ -57,7 +57,7 @@ namespace Wabbajack.BuildServer
}
catch (Exception ex)
{
Logger.Log(LogLevel.Error, ex, $"Error getting or updating Job");
Logger.Log(LogLevel.Error, ex, $"Error getting or updating job");
}
}

View File

@ -17,7 +17,7 @@ namespace Wabbajack.BuildServer.Models.Jobs
public override string Description => "Add missing modlist archives to indexer";
public override async Task<JobResult> Execute(DBContext db, AppSettings settings)
{
Utils.Log("Starting modlist indexing");
Utils.Log("Starting ModList indexing");
var modlists = await ModlistMetadata.LoadFromGithub();
using (var queue = new WorkQueue())
@ -56,7 +56,7 @@ namespace Wabbajack.BuildServer.Models.Jobs
}
else
{
Utils.Log($"No changes detected from downloaded modlist");
Utils.Log($"No changes detected from downloaded ModList");
}
Utils.Log($"Loading {modlist_path}");
@ -79,7 +79,7 @@ namespace Wabbajack.BuildServer.Models.Jobs
var jobs = missing.Select(a => new Job {Payload = new IndexJob {Archive = a}, Priority = Job.JobPriority.Low});
Utils.Log($"Writing jobs to the DB");
Utils.Log($"Writing jobs to the database");
await db.Jobs.InsertManyAsync(jobs, new InsertManyOptions {IsOrdered = false});
Utils.Log($"Done adding archives for {installer.Name}");
}

View File

@ -11,7 +11,7 @@ namespace Wabbajack.BuildServer.Models.Jobs
{
public class GetNexusUpdatesJob : AJobPayload
{
public override string Description => "Poll the nexus for updated mods, and clean any references to those mods";
public override string Description => "Poll the Nexus for updated mods, and clean any references to those mods";
public override async Task<JobResult> Execute(DBContext db, AppSettings settings)
{

View File

@ -0,0 +1,27 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:51578/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Wabbajack.BuildServer": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:51579/"
}
}
}

View File

@ -108,13 +108,13 @@ namespace Wabbajack.Common.StoreHandlers
if (gameMeta == null)
{
Utils.Log($"GOG Game \"{gameName}\"({gameID}) is not supported, skipping");
Utils.Log($"GOG Game \"{gameName}\" ({gameID}) is not supported, skipping");
return;
}
game.Game = gameMeta.Game;
Utils.Log($"Found GOG Game: \"{game.Name}\"({game.ID}) at {game.Path}");
Utils.Log($"Found GOG Game: \"{game.Name}\" ({game.ID}) at {game.Path}");
Games.Add(game);
});

View File

@ -119,7 +119,7 @@ namespace Wabbajack.Common.StoreHandlers
if (SteamUniverses.Count == 0)
{
Utils.Log("Could not find any Steam Libraries!");
Utils.Log("Could not find any Steam Libraries");
return false;
}
@ -166,14 +166,14 @@ namespace Wabbajack.Common.StoreHandlers
if (gameMeta == null)
{
Utils.Log($"Steam Game {game.Name}({game.ID}) is not supported, skipping");
Utils.Log($"Steam Game \"{game.Name}\" ({game.ID}) is not supported, skipping");
return;
}
game.Game = gameMeta.Game;
game.Universe = u;
Utils.Log($"Found Steam Game: \"{game.Name}\"({game.ID}) at {game.Path}");
Utils.Log($"Found Steam Game: \"{game.Name}\" ({game.ID}) at {game.Path}");
LoadWorkshopItems(game);
@ -200,7 +200,7 @@ namespace Wabbajack.Common.StoreHandlers
if (Path.GetFileName(f) != $"appworkshop{game.ID}.acf")
return;
Utils.Log($"Found workshop item file {f} for \"{game.Name}\"");
Utils.Log($"Found Steam Workshop item file {f} for \"{game.Name}\"");
var lines = File.ReadAllLines(f);
var end = false;
@ -282,7 +282,7 @@ namespace Wabbajack.Common.StoreHandlers
currentItem.Game = game;
game.WorkshopItems.Add(currentItem);
Utils.Log($"Found WorkshopItem {currentItem.ItemID}");
Utils.Log($"Found Steam Workshop item {currentItem.ItemID}");
currentItem = null;
end = true;

View File

@ -82,9 +82,9 @@ namespace Wabbajack.Lib
public void ExportModList()
{
Utils.Log($"Exporting ModList to : {ModListOutputFile}");
Utils.Log($"Exporting ModList to {ModListOutputFile}");
// Modify readme and modlist image to relative paths if they exist
// Modify readme and ModList image to relative paths if they exist
if (File.Exists(ModListImage))
{
ModList.Image = "modlist-image.png";

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
@ -322,7 +322,7 @@ namespace Wabbajack.Lib
var available = DriveInfo(g.Key).FreeBytesAvailable;
if (required - contains > available)
throw new NotEnoughDiskSpaceException(
$"This modlist requires {required.ToFileSizeString()} on {g.Key} but only {available.ToFileSizeString()} is available.");
$"This ModList requires {required.ToFileSizeString()} on {g.Key} but only {available.ToFileSizeString()} is available.");
});
*/
}
@ -334,9 +334,9 @@ namespace Wabbajack.Lib
/// </summary>
public async Task OptimizeModlist()
{
Utils.Log("Optimizing Modlist directives");
Utils.Log("Optimizing ModList directives");
// Clone the modlist so our changes don't modify the original data
// Clone the ModList so our changes don't modify the original data
ModList = ModList.Clone();
var indexed = ModList.Directives.ToDictionary(d => d.To);
@ -346,11 +346,11 @@ namespace Wabbajack.Lib
.PMap(Queue, UpdateTracker, f =>
{
var relative_to = f.RelativeTo(OutputFolder);
Utils.Status($"Checking if modlist file {relative_to}");
Utils.Status($"Checking if ModList file {relative_to}");
if (indexed.ContainsKey(relative_to) || f.IsInPath(DownloadFolder))
return;
Utils.Log($"Deleting {relative_to} it's not part of this modlist");
Utils.Log($"Deleting {relative_to} it's not part of this ModList");
File.Delete(f);
});
@ -399,7 +399,7 @@ namespace Wabbajack.Lib
Utils.Log("Error when trying to clean empty folders. This doesn't really matter.");
}
UpdateTracker.NextStep("Updating Modlist");
UpdateTracker.NextStep("Updating ModList");
Utils.Log($"Optimized {ModList.Directives.Count} directives to {indexed.Count} required");
var requiredArchives = indexed.Values.OfType<FromArchive>()
.GroupBy(d => d.ArchiveHashPath[0])

View File

@ -24,7 +24,7 @@ namespace Wabbajack.Lib.CompilationSteps
!File.Exists(gameFile)) return null;
Utils.Log(
$"A ESM named {filename} was found in a mod that shares a name with a core game ESMs, it is assumed this is a cleaned ESM and it will be binary patched.");
$"An ESM named {filename} was found in a mod that shares a name with one of the core game ESMs, it is assumed this is a cleaned ESM and it will be binary patched");
var result = source.EvolveTo<CleanedESM>();
result.SourceESMHash = _compiler.VFS.Index.ByRootPath[gameFile].Hash;

View File

@ -88,7 +88,7 @@ namespace Wabbajack.Lib.Downloaders
{
try
{
Utils.Log($"You must manually visit {Url} and download {a.Name} file by hand.");
Utils.Log($"You must manually visit {Url} and download {a.Name} file by hand");
Utils.Log($"Waiting for {a.Name}");
downloader._watcher.EnableRaisingEvents = true;
var watcher = downloader._fileEvents

View File

@ -146,7 +146,7 @@ namespace Wabbajack.Lib.Downloaders
}
catch (Exception ex)
{
Utils.Log($"{a.Name} - Error Getting Nexus Download URL - {ex.Message}");
Utils.Log($"{a.Name} - Error getting Nexus download URL - {ex.Message}");
return;
}
@ -183,7 +183,7 @@ namespace Wabbajack.Lib.Downloaders
}
catch (Exception ex)
{
Utils.Log($"{ModName} - {GameName} - {ModID} - {FileID} - Error Getting Nexus Download URL - {ex}");
Utils.Log($"{ModName} - {GameName} - {ModID} - {FileID} - Error getting Nexus download URL - {ex}");
return false;
}

View File

@ -54,8 +54,8 @@ namespace Wabbajack.Lib
if (GameFolder == null)
{
await Utils.Log(new CriticalFailureIntervention(
$"In order to do a proper install Wabbajack needs to know where your {game.MO2Name} folder resides. We tried looking the" +
"game location up in the windows registry but were unable to find it, please make sure you launch the game once before running this installer. ",
$"In order to do a proper install Wabbajack needs to know where your {game.MO2Name} folder resides. We tried looking the " +
"game location up in the Windows Registry but were unable to find it, please make sure you launch the game once before running this installer. ",
"Could not find game location")).Task;
Utils.Log("Exiting because we couldn't find the game folder.");
return false;
@ -82,7 +82,7 @@ namespace Wabbajack.Lib
}
if (cancel.IsCancellationRequested) return false;
UpdateTracker.NextStep("Optimizing Modlist");
UpdateTracker.NextStep("Optimizing ModList");
await OptimizeModlist();
if (cancel.IsCancellationRequested) return false;
@ -321,13 +321,13 @@ namespace Wabbajack.Lib
if (!Directory.Exists(path)) return ErrorResponse.Success;
// Check folder does not have a wabbajack modlist
// Check folder does not have a Wabbajack ModList
foreach (var file in Directory.EnumerateFiles(path))
{
if (!File.Exists(file)) continue;
if (System.IO.Path.GetExtension(file).Equals(ExtensionManager.Extension))
{
return ErrorResponse.Fail($"Cannot install into a folder with a Wabbajack modlist inside of it.");
return ErrorResponse.Fail($"Cannot install into a folder with a Wabbajack ModList inside of it");
}
}

View File

@ -61,7 +61,7 @@ namespace Wabbajack.Lib.ModListRegistry
public static async Task<List<ModlistMetadata>> LoadFromGithub()
{
var client = new HttpClient();
Utils.Log("Loading ModLists from Github");
Utils.Log("Loading ModLists from GitHub");
var metadataResult = client.GetStringAsync(Consts.ModlistMetadataURL);
var summaryResult = client.GetStringAsync(Consts.ModlistSummaryURL);

View File

@ -90,7 +90,7 @@ namespace Wabbajack.Lib.NexusApi
public static async Task<string> SetupNexusLogin(IWebDriver browser, Action<string> updateStatus, CancellationToken cancel)
{
updateStatus("Please Log Into the Nexus");
updateStatus("Please log into the Nexus");
await browser.NavigateTo(new Uri("https://users.nexusmods.com/auth/continue?client_id=nexus&redirect_uri=https://www.nexusmods.com/oauth/callback&response_type=code&referrer=//www.nexusmods.com"));
while (true)
{
@ -111,7 +111,7 @@ namespace Wabbajack.Lib.NexusApi
}
})
{
updateStatus("Please Authorize Wabbajack to Download Mods");
updateStatus("Please authorize Wabbajack to download Nexus mods");
var api_key = new TaskCompletionSource<string>();
websocket.OnMessage += (sender, msg) => { api_key.SetResult(msg.Data); };
@ -174,7 +174,7 @@ namespace Wabbajack.Lib.NexusApi
{
var dailyRemaining = int.Parse(response.Headers.GetValues("x-rl-daily-remaining").First());
var hourlyRemaining = int.Parse(response.Headers.GetValues("x-rl-hourly-remaining").First());
Utils.Log($"Nexus Requests Remaining: {dailyRemaining} daily - {hourlyRemaining} hourly");
Utils.Log($"Nexus requests remaining: {dailyRemaining} daily - {hourlyRemaining} hourly");
lock (RemainingLock)
{

View File

@ -11,8 +11,8 @@ using Path = Alphaleonis.Win32.Filesystem.Path;
namespace Wabbajack.Lib.Validation
{
/// <summary>
/// Core class for rights management. Given a Wabbajack modlist this class will return a list of all the
/// know rights violations of the modlist
/// Core class for rights management. Given a Wabbajack ModList this class will return a list of all the
/// known rights violations of the ModList
/// </summary>
public class ValidateModlist
{
@ -39,18 +39,18 @@ namespace Wabbajack.Lib.Validation
public async Task LoadListsFromGithub()
{
var client = new HttpClient();
Utils.Log("Loading Nexus Mod Permissions");
Utils.Log("Loading Nexus mod permissions");
using (var result = await client.GetStreamAsync(Consts.ModPermissionsURL))
{
AuthorPermissions = result.FromYaml<Dictionary<string, Author>>();
Utils.Log($"Loaded permissions for {AuthorPermissions.Count} authors");
}
Utils.Log("Loading Server Whitelist");
Utils.Log("Loading server whitelist");
using (var result = await client.GetStreamAsync(Consts.ServerWhitelistURL))
{
ServerWhitelist = result.FromYaml<ServerWhitelist>();
Utils.Log($"Loaded permissions for {ServerWhitelist.AllowedPrefixes.Count} servers and {ServerWhitelist.GoogleIDs.Count} GDrive files");
Utils.Log($"Loaded permissions for {ServerWhitelist.AllowedPrefixes.Count} servers and {ServerWhitelist.GoogleIDs.Count} Google Drive files");
}
}
@ -66,12 +66,11 @@ namespace Wabbajack.Lib.Validation
errors.Do(e => Utils.Log(e));
if (errors.Count() > 0)
{
Utils.Log($"{errors.Count()} validation errors found, cannot continue.");
throw new Exception($"{errors.Count()} validation errors found, cannot continue.");
}
else
{
Utils.Log("No Validation failures");
Utils.Log("No validation failures");
}
}
@ -141,7 +140,7 @@ namespace Wabbajack.Lib.Validation
if (!(archive.permissions.CanExtractBSAs ?? true) &&
p.ArchiveHashPath.Skip(1).ButLast().Any(a => Consts.SupportedBSAs.Contains(Path.GetExtension(a).ToLower())))
{
ValidationErrors.Push($"{p.To} from {url} is set to disallow BSA Extraction");
ValidationErrors.Push($"{p.To} from {url} is set to disallow BSA extraction");
}
}
});
@ -157,7 +156,7 @@ namespace Wabbajack.Lib.Validation
if (!(permissions.CanUseInOtherGames ?? true))
{
ValidationErrors.Push(
$"The modlist is for {nexus} but {m.Name} is for game type {((NexusDownloader.State)m.State).GameName} and is not allowed to be converted to other game types");
$"The ModList is for {nexus} but {m.Name} is for game type {((NexusDownloader.State)m.State).GameName} and is not allowed to be converted to other game types");
}
});

View File

@ -335,14 +335,14 @@ namespace Wabbajack.Lib
if (ActiveArchives.Contains(archive))
return;
Utils.Log($"Adding Archive {archive} to ActiveArchives");
Utils.Log($"Adding archive {archive} to ActiveArchives");
ActiveArchives.Add(archive);
});
}
private async Task CreateMetaFiles()
{
Utils.Log("Getting Nexus api_key, please click authorize if a browser window appears");
Utils.Log("Getting Nexus API key, please click authorize if a browser window appears");
var nexusClient = await NexusApiClient.Get();
var archives = Directory.EnumerateFiles(DownloadsFolder, "*", SearchOption.TopDirectoryOnly).Where(f =>
@ -423,7 +423,7 @@ namespace Wabbajack.Lib
var filePath = Path.Combine(DownloadsFolder, $"steamWorkshopItem_{item.ItemID}.meta");
if (File.Exists(filePath))
{
Utils.Log($"File {filePath} already exists, skipping...");
Utils.Log($"File {filePath} already exists, skipping");
return;
}

View File

@ -42,7 +42,7 @@ namespace Wabbajack.Lib
var metric = Metrics.Send("begin_install", ModList.Name);
var result = await Utils.Log(new YesNoIntervention(
"Vortex Support is still experimental and may produce unexpected results. " +
"If anything fails go to the special vortex support channels on the discord. @erri120#2285 " +
"If anything fails please go to the special Vortex support channels on the Wabbajack Discord and contact @erri120#2285 " +
"for support.", "Continue with experimental feature?")).Task;
if (result == ConfirmationIntervention.Choice.Abort)
{
@ -115,7 +115,7 @@ namespace Wabbajack.Lib
var result = await Utils.Log(new YesNoIntervention("Some mods from this ModList must be installed directly into " +
"the game folder. Do you want to do this manually or do you want Wabbajack " +
"to do this for you?", "Install game folder mods?")).Task;
"to do this for you?", "Move mods into game folder?")).Task;
if (result != ConfirmationIntervention.Choice.Continue)
return;
@ -173,7 +173,7 @@ namespace Wabbajack.Lib
return;
var result = await Utils.Log(new YesNoIntervention(
"The ModList you are installing requires Steam Workshop Items to exist. " +
"The ModList you are installing requires Steam Workshop items to exist. " +
"You can check the Workshop Items in the manifest of this ModList. Wabbajack can start Steam for you " +
"and download the Items automatically. Do you want to proceed with this step?",
"Download Steam Workshop Items?")).Task;

View File

@ -36,7 +36,7 @@ namespace Wabbajack.Test
Helpers.Init();
Utils.LogMessages.OfType<IInfo>().Subscribe(onNext: msg => TestContext.WriteLine(msg.ShortDescription));
Utils.LogMessages.OfType<IUserIntervention>().Subscribe(msg =>
TestContext.WriteLine("ERROR: User intervetion required: " + msg.ShortDescription));
TestContext.WriteLine("ERROR: User intervention required: " + msg.ShortDescription));
}

View File

@ -64,7 +64,7 @@ namespace Wabbajack.Test
{
Utils.LogMessages.OfType<IInfo>().Subscribe(onNext: msg => TestContext.WriteLine(msg.ShortDescription));
Utils.LogMessages.OfType<IUserIntervention>().Subscribe(msg =>
TestContext.WriteLine("ERROR: User intervetion required: " + msg.ShortDescription));
TestContext.WriteLine("ERROR: User intervention required: " + msg.ShortDescription));
}
[TestMethod]

View File

@ -77,7 +77,7 @@ namespace Wabbajack
{
ExistCheckOption = FilePickerVM.CheckOptions.IfPathNotEmpty,
PathType = FilePickerVM.PathTypeOptions.Folder,
PromptTitle = "Select the folder to place the resulting modlist.wabbajack file",
PromptTitle = "Select the folder to export the compiled Wabbajack ModList to",
};
// Load settings

View File

@ -46,13 +46,13 @@ namespace Wabbajack
{
ExistCheckOption = FilePickerVM.CheckOptions.On,
PathType = FilePickerVM.PathTypeOptions.File,
PromptTitle = "Select modlist"
PromptTitle = "Select a ModList"
};
DownloadLocation = new FilePickerVM()
{
ExistCheckOption = FilePickerVM.CheckOptions.On,
PathType = FilePickerVM.PathTypeOptions.Folder,
PromptTitle = "Select download location",
PromptTitle = "Select a downloads location",
};
_mo2Folder = this.WhenAny(x => x.ModListLocation.TargetPath)
@ -84,15 +84,15 @@ namespace Wabbajack
})
.ToProperty(this, nameof(MOProfile));
// Wire missing Mo2Folder to signal error state for Modlist Location
// Wire missing Mo2Folder to signal error state for ModList Location
ModListLocation.AdditionalError = this.WhenAny(x => x.Mo2Folder)
.Select<string, IErrorResponse>(moFolder =>
{
if (Directory.Exists(moFolder)) return ErrorResponse.Success;
return ErrorResponse.Fail($"MO2 Folder could not be located from the given modlist location.{Environment.NewLine}Make sure your modlist is inside a valid MO2 distribution.");
return ErrorResponse.Fail($"MO2 folder could not be located from the given ModList location.{Environment.NewLine}Make sure your ModList is inside a valid MO2 distribution.");
});
// Load custom modlist settings per MO2 profile
// Load custom ModList settings per MO2 profile
_modlistSettings = Observable.CombineLatest(
(this).WhenAny(x => x.ModListLocation.ErrorState),
(this).WhenAny(x => x.ModListLocation.TargetPath),

View File

@ -115,7 +115,7 @@ namespace Wabbajack
{
ExistCheckOption = FilePickerVM.CheckOptions.On,
PathType = FilePickerVM.PathTypeOptions.File,
PromptTitle = "Select a modlist to install"
PromptTitle = "Select a ModList to install"
};
// Swap to proper sub VM based on selected type
@ -173,12 +173,12 @@ namespace Wabbajack
.Select(modList => modList?.ModManager)
.ToProperty(this, nameof(TargetManager));
// Add additional error check on modlist
// Add additional error check on ModList
ModListLocation.AdditionalError = this.WhenAny(x => x.ModList)
.Select<ModListVM, IErrorResponse>(modList =>
{
if (modList == null) return ErrorResponse.Fail("Modlist path resulted in a null object.");
if (modList.Error != null) return ErrorResponse.Fail("Modlist is corrupt", modList.Error);
if (modList == null) return ErrorResponse.Fail("ModList path resulted in a null object.");
if (modList.Error != null) return ErrorResponse.Fail("ModList is corrupt", modList.Error);
return ErrorResponse.Success;
});
@ -214,7 +214,7 @@ namespace Wabbajack
Slideshow = new SlideShow(this);
// Set display items to modlist if configuring or complete,
// Set display items to ModList if configuring or complete,
// or to the current slideshow data if installing
_image = Observable.CombineLatest(
this.WhenAny(x => x.ModList.Error),

View File

@ -100,7 +100,7 @@ namespace Wabbajack
var entry = ar.GetEntry(Readme);
if (entry == null)
{
Utils.Log($"Tried to open a non-existant readme: {Readme}");
Utils.Log($"Tried to open a non-existent readme: {Readme}");
return;
}
using (var e = entry.Open())

View File

@ -91,7 +91,7 @@ namespace Wabbajack
.Shuffle(_random)
.AsObservableChangeSet(x => x.ModID);
})
// Switch to the new list after every modlist change
// Switch to the new list after every ModList change
.Switch()
// Filter out any NSFW slides if we don't want them
.AutoRefreshOnObservable(slide => this.WhenAny(x => x.ShowNSFW))