mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Make Logger naming consistent
This commit is contained in:
@@ -47,7 +47,7 @@ namespace SabreTools.DatFiles
|
||||
/// Logging object
|
||||
/// </summary>
|
||||
[JsonIgnore, XmlIgnore]
|
||||
protected Logger logger;
|
||||
protected Logger _logger;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace SabreTools.DatFiles
|
||||
/// <param name="datFile">DatFile to get the values from</param>
|
||||
public DatFile(DatFile? datFile)
|
||||
{
|
||||
logger = new Logger(this);
|
||||
_logger = new Logger(this);
|
||||
if (datFile != null)
|
||||
{
|
||||
Header = datFile.Header;
|
||||
@@ -656,7 +656,7 @@ namespace SabreTools.DatFiles
|
||||
if (rom.GetInt64FieldValue(Models.Metadata.Rom.SizeKey) == null
|
||||
&& rom.GetStringFieldValue(Models.Metadata.Rom.CRCKey) == "null")
|
||||
{
|
||||
logger.Verbose($"Empty folder found: {machine.GetStringFieldValue(Models.Metadata.Machine.NameKey)}");
|
||||
_logger.Verbose($"Empty folder found: {machine.GetStringFieldValue(Models.Metadata.Machine.NameKey)}");
|
||||
|
||||
rom.SetName(rom.GetName() == "null" ? "-" : rom.GetName());
|
||||
rom.SetFieldValue<string?>(Models.Metadata.Rom.SizeKey, Constants.SizeZero.ToString());
|
||||
@@ -700,7 +700,7 @@ namespace SabreTools.DatFiles
|
||||
if (rom.GetInt64FieldValue(Models.Metadata.Rom.SizeKey) == null
|
||||
&& rom.GetStringFieldValue(Models.Metadata.Rom.CRCKey) == "null")
|
||||
{
|
||||
logger.Verbose($"Empty folder found: {machineObj.GetStringFieldValue(Models.Metadata.Machine.NameKey)}");
|
||||
_logger.Verbose($"Empty folder found: {machineObj.GetStringFieldValue(Models.Metadata.Machine.NameKey)}");
|
||||
|
||||
rom.SetName(rom.GetName() == "null" ? "-" : rom.GetName());
|
||||
rom.SetFieldValue<string?>(Models.Metadata.Rom.SizeKey, Constants.SizeZero.ToString());
|
||||
@@ -828,14 +828,14 @@ namespace SabreTools.DatFiles
|
||||
if (datItem.GetDuplicateStatus(lastItem).HasFlag(DupeType.All))
|
||||
#endif
|
||||
{
|
||||
logger.Verbose($"Exact duplicate found for '{datItemName}'");
|
||||
_logger.Verbose($"Exact duplicate found for '{datItemName}'");
|
||||
continue;
|
||||
}
|
||||
|
||||
// If the current name matches the previous name, rename the current item
|
||||
else if (datItemName == lastItemName)
|
||||
{
|
||||
logger.Verbose($"Name duplicate found for '{datItemName}'");
|
||||
_logger.Verbose($"Name duplicate found for '{datItemName}'");
|
||||
|
||||
if (datItem is Disk || datItem is DatItems.Formats.File || datItem is Media || datItem is Rom)
|
||||
{
|
||||
@@ -923,14 +923,14 @@ namespace SabreTools.DatFiles
|
||||
if (datItem.Value.GetDuplicateStatus(lastItem).HasFlag(DupeType.All))
|
||||
#endif
|
||||
{
|
||||
logger.Verbose($"Exact duplicate found for '{datItemName}'");
|
||||
_logger.Verbose($"Exact duplicate found for '{datItemName}'");
|
||||
continue;
|
||||
}
|
||||
|
||||
// If the current name matches the previous name, rename the current item
|
||||
else if (datItemName == lastItemName)
|
||||
{
|
||||
logger.Verbose($"Name duplicate found for '{datItemName}'");
|
||||
_logger.Verbose($"Name duplicate found for '{datItemName}'");
|
||||
|
||||
if (datItem.Value is Disk || datItem.Value is DatItems.Formats.File || datItem.Value is Media || datItem.Value is Rom)
|
||||
{
|
||||
@@ -984,7 +984,7 @@ namespace SabreTools.DatFiles
|
||||
// If this is invoked with a null DatItem, we ignore
|
||||
if (datItem == null)
|
||||
{
|
||||
logger?.Verbose($"Item was skipped because it was null");
|
||||
_logger?.Verbose($"Item was skipped because it was null");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -992,7 +992,7 @@ namespace SabreTools.DatFiles
|
||||
if (datItem.GetBoolFieldValue(DatItem.RemoveKey) == true)
|
||||
{
|
||||
string itemString = JsonConvert.SerializeObject(datItem, Formatting.None);
|
||||
logger?.Verbose($"Item '{itemString}' was skipped because it was marked for removal");
|
||||
_logger?.Verbose($"Item '{itemString}' was skipped because it was marked for removal");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1000,7 +1000,7 @@ namespace SabreTools.DatFiles
|
||||
if (datItem is Blank)
|
||||
{
|
||||
string itemString = JsonConvert.SerializeObject(datItem, Formatting.None);
|
||||
logger?.Verbose($"Item '{itemString}' was skipped because it was of type 'Blank'");
|
||||
_logger?.Verbose($"Item '{itemString}' was skipped because it was of type 'Blank'");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1012,7 +1012,7 @@ namespace SabreTools.DatFiles
|
||||
if (size == 0 || size == null)
|
||||
{
|
||||
string itemString = JsonConvert.SerializeObject(datItem, Formatting.None);
|
||||
logger?.Verbose($"Item '{itemString}' was skipped because it had an invalid size");
|
||||
_logger?.Verbose($"Item '{itemString}' was skipped because it had an invalid size");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1023,7 +1023,7 @@ namespace SabreTools.DatFiles
|
||||
if (!Array.Exists(GetSupportedTypes(), t => t == itemType))
|
||||
{
|
||||
string itemString = JsonConvert.SerializeObject(datItem, Formatting.None);
|
||||
logger?.Verbose($"Item '{itemString}' was skipped because it was not supported in {datFormat}");
|
||||
_logger?.Verbose($"Item '{itemString}' was skipped because it was not supported in {datFormat}");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1033,9 +1033,9 @@ namespace SabreTools.DatFiles
|
||||
{
|
||||
string itemString = JsonConvert.SerializeObject(datItem, Formatting.None);
|
||||
#if NET20 || NET35
|
||||
logger?.Verbose($"Item '{itemString}' was skipped because it was missing required fields for {datFormat}: {string.Join(", ", [.. missingFields])}");
|
||||
_logger?.Verbose($"Item '{itemString}' was skipped because it was missing required fields for {datFormat}: {string.Join(", ", [.. missingFields])}");
|
||||
#else
|
||||
logger?.Verbose($"Item '{itemString}' was skipped because it was missing required fields for {datFormat}: {string.Join(", ", missingFields)}");
|
||||
_logger?.Verbose($"Item '{itemString}' was skipped because it was missing required fields for {datFormat}: {string.Join(", ", missingFields)}");
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace SabreTools.DatFiles
|
||||
/// <summary>
|
||||
/// Logging object
|
||||
/// </summary>
|
||||
private static readonly Logger logger = new();
|
||||
private static readonly Logger _staticLogger = new();
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1426,7 +1426,7 @@ namespace SabreTools.DatFiles
|
||||
#endif
|
||||
{
|
||||
var input = inputs[i];
|
||||
logger.User($"Adding DAT: {input.CurrentPath}");
|
||||
_staticLogger.User($"Adding DAT: {input.CurrentPath}");
|
||||
datFiles[i] = DatFile.Create(datFile.Header.CloneFiltering());
|
||||
Parser.ParseInto(datFiles[i], input, i, keep: true);
|
||||
#if NET40_OR_GREATER || NETCOREAPP
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
string message = $"'{filename}' - An error occurred during parsing";
|
||||
logger.Error(ex, message);
|
||||
_logger.Error(ex, message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,24 +174,24 @@ namespace SabreTools.DatFiles.Formats
|
||||
{
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
_logger.User($"Writing to '{outfile}'...");
|
||||
|
||||
// Serialize the input file
|
||||
var metadata = ConvertMetadata(ignoreblanks);
|
||||
var metadataFile = new Serialization.CrossModel.ClrMamePro().Deserialize(metadata);
|
||||
if (!Serialization.Serializers.ClrMamePro.SerializeFile(metadataFile, outfile, _quotes))
|
||||
{
|
||||
logger.Warning($"File '{outfile}' could not be written! See the log for more details.");
|
||||
_logger.Warning($"File '{outfile}' could not be written! See the log for more details.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Error(ex);
|
||||
_logger.Error(ex);
|
||||
return false;
|
||||
}
|
||||
|
||||
logger.User($"'{outfile}' written!{Environment.NewLine}");
|
||||
_logger.User($"'{outfile}' written!{Environment.NewLine}");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
string message = $"'{filename}' - An error occurred during parsing";
|
||||
logger.Error(ex, message);
|
||||
_logger.Error(ex, message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,24 +194,24 @@ namespace SabreTools.DatFiles.Formats
|
||||
{
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
_logger.User($"Writing to '{outfile}'...");
|
||||
|
||||
// Serialize the input file
|
||||
var metadata = ConvertMetadata(ignoreblanks);
|
||||
var hashfile = new Serialization.CrossModel.Hashfile().Deserialize(metadata, _hash);
|
||||
if (!(Serialization.Serializers.Hashfile.SerializeFile(hashfile, outfile, _hash)))
|
||||
{
|
||||
logger.Warning($"File '{outfile}' could not be written! See the log for more details.");
|
||||
_logger.Warning($"File '{outfile}' could not be written! See the log for more details.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Error(ex);
|
||||
_logger.Error(ex);
|
||||
return false;
|
||||
}
|
||||
|
||||
logger.User($"'{outfile}' written!{Environment.NewLine}");
|
||||
_logger.User($"'{outfile}' written!{Environment.NewLine}");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
string message = $"'{filename}' - An error occurred during parsing";
|
||||
logger.Error(ex, message);
|
||||
_logger.Error(ex, message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -348,7 +348,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
{
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
_logger.User($"Writing to '{outfile}'...");
|
||||
|
||||
// Serialize the input file
|
||||
var metadata = ConvertMetadata(ignoreblanks);
|
||||
@@ -364,17 +364,17 @@ namespace SabreTools.DatFiles.Formats
|
||||
|
||||
if (!success)
|
||||
{
|
||||
logger.Warning($"File '{outfile}' could not be written! See the log for more details.");
|
||||
_logger.Warning($"File '{outfile}' could not be written! See the log for more details.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Error(ex);
|
||||
_logger.Error(ex);
|
||||
return false;
|
||||
}
|
||||
|
||||
logger.User($"'{outfile}' written!{Environment.NewLine}");
|
||||
_logger.User($"'{outfile}' written!{Environment.NewLine}");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,13 +39,13 @@ namespace SabreTools.DatFiles.Formats
|
||||
{
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
_logger.User($"Writing to '{outfile}'...");
|
||||
FileStream fs = File.Create(outfile);
|
||||
|
||||
// If we get back null for some reason, just log and return
|
||||
if (fs == null)
|
||||
{
|
||||
logger.Warning($"File '{outfile}' could not be created for writing! Please check to see if the file is writable");
|
||||
_logger.Warning($"File '{outfile}' could not be created for writing! Please check to see if the file is writable");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -82,13 +82,13 @@ namespace SabreTools.DatFiles.Formats
|
||||
}
|
||||
}
|
||||
|
||||
logger.User($"'{outfile}' written!{Environment.NewLine}");
|
||||
_logger.User($"'{outfile}' written!{Environment.NewLine}");
|
||||
sw.Dispose();
|
||||
fs.Dispose();
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Error(ex);
|
||||
_logger.Error(ex);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -100,13 +100,13 @@ namespace SabreTools.DatFiles.Formats
|
||||
{
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
_logger.User($"Writing to '{outfile}'...");
|
||||
FileStream fs = File.Create(outfile);
|
||||
|
||||
// If we get back null for some reason, just log and return
|
||||
if (fs == null)
|
||||
{
|
||||
logger.Warning($"File '{outfile}' could not be created for writing! Please check to see if the file is writable");
|
||||
_logger.Warning($"File '{outfile}' could not be created for writing! Please check to see if the file is writable");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -146,13 +146,13 @@ namespace SabreTools.DatFiles.Formats
|
||||
}
|
||||
}
|
||||
|
||||
logger.User($"'{outfile}' written!{Environment.NewLine}");
|
||||
_logger.User($"'{outfile}' written!{Environment.NewLine}");
|
||||
sw.Dispose();
|
||||
fs.Dispose();
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Error(ex);
|
||||
_logger.Error(ex);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Warning($"Exception found while parsing '{filename}': {ex}");
|
||||
_logger.Warning($"Exception found while parsing '{filename}': {ex}");
|
||||
}
|
||||
|
||||
jtr.Close();
|
||||
@@ -365,13 +365,13 @@ namespace SabreTools.DatFiles.Formats
|
||||
{
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
_logger.User($"Writing to '{outfile}'...");
|
||||
FileStream fs = System.IO.File.Create(outfile);
|
||||
|
||||
// If we get back null for some reason, just log and return
|
||||
if (fs == null)
|
||||
{
|
||||
logger.Warning($"File '{outfile}' could not be created for writing! Please check to see if the file is writable");
|
||||
_logger.Warning($"File '{outfile}' could not be created for writing! Please check to see if the file is writable");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -428,13 +428,13 @@ namespace SabreTools.DatFiles.Formats
|
||||
// Write the file footer out
|
||||
WriteFooter(jtw);
|
||||
|
||||
logger.User($"'{outfile}' written!{Environment.NewLine}");
|
||||
_logger.User($"'{outfile}' written!{Environment.NewLine}");
|
||||
jtw.Close();
|
||||
fs.Dispose();
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Error(ex);
|
||||
_logger.Error(ex);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -446,13 +446,13 @@ namespace SabreTools.DatFiles.Formats
|
||||
{
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
_logger.User($"Writing to '{outfile}'...");
|
||||
FileStream fs = System.IO.File.Create(outfile);
|
||||
|
||||
// If we get back null for some reason, just log and return
|
||||
if (fs == null)
|
||||
{
|
||||
logger.Warning($"File '{outfile}' could not be created for writing! Please check to see if the file is writable");
|
||||
_logger.Warning($"File '{outfile}' could not be created for writing! Please check to see if the file is writable");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -509,13 +509,13 @@ namespace SabreTools.DatFiles.Formats
|
||||
// Write the file footer out
|
||||
WriteFooter(jtw);
|
||||
|
||||
logger.User($"'{outfile}' written!{Environment.NewLine}");
|
||||
_logger.User($"'{outfile}' written!{Environment.NewLine}");
|
||||
jtw.Close();
|
||||
fs.Dispose();
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Error(ex);
|
||||
_logger.Error(ex);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Warning(ex, $"Exception found while parsing '{filename}'");
|
||||
_logger.Warning(ex, $"Exception found while parsing '{filename}'");
|
||||
|
||||
// For XML errors, just skip the affected node
|
||||
xtr?.Read();
|
||||
@@ -194,13 +194,13 @@ namespace SabreTools.DatFiles.Formats
|
||||
{
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
_logger.User($"Writing to '{outfile}'...");
|
||||
FileStream fs = File.Create(outfile);
|
||||
|
||||
// If we get back null for some reason, just log and return
|
||||
if (fs == null)
|
||||
{
|
||||
logger.Warning($"File '{outfile}' could not be created for writing! Please check to see if the file is writable");
|
||||
_logger.Warning($"File '{outfile}' could not be created for writing! Please check to see if the file is writable");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
// Write the file footer out
|
||||
WriteFooter(xtw);
|
||||
|
||||
logger.User($"'{outfile}' written!{Environment.NewLine}");
|
||||
_logger.User($"'{outfile}' written!{Environment.NewLine}");
|
||||
#if NET452_OR_GREATER
|
||||
xtw.Dispose();
|
||||
#endif
|
||||
@@ -264,7 +264,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Error(ex);
|
||||
_logger.Error(ex);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -276,13 +276,13 @@ namespace SabreTools.DatFiles.Formats
|
||||
{
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
_logger.User($"Writing to '{outfile}'...");
|
||||
FileStream fs = File.Create(outfile);
|
||||
|
||||
// If we get back null for some reason, just log and return
|
||||
if (fs == null)
|
||||
{
|
||||
logger.Warning($"File '{outfile}' could not be created for writing! Please check to see if the file is writable");
|
||||
_logger.Warning($"File '{outfile}' could not be created for writing! Please check to see if the file is writable");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
// Write the file footer out
|
||||
WriteFooter(xtw);
|
||||
|
||||
logger.User($"'{outfile}' written!{Environment.NewLine}");
|
||||
_logger.User($"'{outfile}' written!{Environment.NewLine}");
|
||||
#if NET452_OR_GREATER
|
||||
xtw.Dispose();
|
||||
#endif
|
||||
@@ -346,7 +346,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Error(ex);
|
||||
_logger.Error(ex);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace SabreTools.DatFiles.Formats
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
string message = $"'{filename}' - An error occurred during parsing";
|
||||
logger.Error(ex, message);
|
||||
_logger.Error(ex, message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,24 +94,24 @@ namespace SabreTools.DatFiles.Formats
|
||||
{
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
_logger.User($"Writing to '{outfile}'...");
|
||||
|
||||
// Serialize the input file
|
||||
var metadata = ConvertMetadata(ignoreblanks);
|
||||
var metadataFile = new Serialization.CrossModel.SeparatedValue().Deserialize(metadata);
|
||||
if (!(Serialization.Serializers.SeparatedValue.SerializeFile(metadataFile, outfile, _delim)))
|
||||
{
|
||||
logger.Warning($"File '{outfile}' could not be written! See the log for more details.");
|
||||
_logger.Warning($"File '{outfile}' could not be written! See the log for more details.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Error(ex);
|
||||
_logger.Error(ex);
|
||||
return false;
|
||||
}
|
||||
|
||||
logger.User($"'{outfile}' written!{Environment.NewLine}");
|
||||
_logger.User($"'{outfile}' written!{Environment.NewLine}");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace SabreTools.DatFiles
|
||||
/// <summary>
|
||||
/// Logging object
|
||||
/// </summary>
|
||||
private readonly Logger logger;
|
||||
private readonly Logger _logger;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace SabreTools.DatFiles
|
||||
{
|
||||
bucketedBy = ItemKey.NULL;
|
||||
mergedBy = DedupeType.None;
|
||||
logger = new Logger(this);
|
||||
_logger = new Logger(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -196,7 +196,7 @@ namespace SabreTools.DatFiles
|
||||
&& string.IsNullOrEmpty(disk.GetStringFieldValue(Models.Metadata.Disk.MD5Key))
|
||||
&& string.IsNullOrEmpty(disk.GetStringFieldValue(Models.Metadata.Disk.SHA1Key)))
|
||||
{
|
||||
logger.Verbose($"Incomplete entry for '{disk.GetName()}' will be output as nodump");
|
||||
_logger.Verbose($"Incomplete entry for '{disk.GetName()}' will be output as nodump");
|
||||
disk.SetFieldValue<string?>(Models.Metadata.Disk.StatusKey, ItemStatus.Nodump.AsStringValue());
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ namespace SabreTools.DatFiles
|
||||
&& string.IsNullOrEmpty(media.GetStringFieldValue(Models.Metadata.Media.SHA256Key))
|
||||
&& string.IsNullOrEmpty(media.GetStringFieldValue(Models.Metadata.Media.SpamSumKey)))
|
||||
{
|
||||
logger.Verbose($"Incomplete entry for '{media.GetName()}' will be output as nodump");
|
||||
_logger.Verbose($"Incomplete entry for '{media.GetName()}' will be output as nodump");
|
||||
}
|
||||
|
||||
item = media;
|
||||
@@ -539,20 +539,20 @@ namespace SabreTools.DatFiles
|
||||
// If the sorted type isn't the same, we want to sort the dictionary accordingly
|
||||
if (bucketedBy != bucketBy && bucketBy != ItemKey.NULL)
|
||||
{
|
||||
logger.User($"Organizing roms by {bucketBy}");
|
||||
_logger.User($"Organizing roms by {bucketBy}");
|
||||
PerformBucketing(bucketBy, lower, norename);
|
||||
}
|
||||
|
||||
// If the merge type isn't the same, we want to merge the dictionary accordingly
|
||||
if (mergedBy != dedupeType)
|
||||
{
|
||||
logger.User($"Deduping roms by {dedupeType}");
|
||||
_logger.User($"Deduping roms by {dedupeType}");
|
||||
PerformDeduplication(bucketBy, dedupeType);
|
||||
}
|
||||
// If the merge type is the same, we want to sort the dictionary to be consistent
|
||||
else
|
||||
{
|
||||
logger.User($"Sorting roms by {bucketBy}");
|
||||
_logger.User($"Sorting roms by {bucketBy}");
|
||||
PerformSorting();
|
||||
}
|
||||
}
|
||||
@@ -879,7 +879,7 @@ namespace SabreTools.DatFiles
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Warning(ex.ToString());
|
||||
_logger.Warning(ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ namespace SabreTools.DatFiles
|
||||
/// <summary>
|
||||
/// Logging object
|
||||
/// </summary>
|
||||
private readonly Logger logger;
|
||||
private readonly Logger _logger;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -165,7 +165,7 @@ namespace SabreTools.DatFiles
|
||||
/// </summary>
|
||||
public ItemDictionaryDB()
|
||||
{
|
||||
logger = new Logger(this);
|
||||
_logger = new Logger(this);
|
||||
}
|
||||
|
||||
#region Accessors
|
||||
@@ -1237,7 +1237,7 @@ namespace SabreTools.DatFiles
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Warning(ex.ToString());
|
||||
_logger.Warning(ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace SabreTools.DatFiles
|
||||
/// <summary>
|
||||
/// Logging object
|
||||
/// </summary>
|
||||
private static readonly Logger logger = new();
|
||||
private static readonly Logger _staticLogger = new();
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -117,7 +117,7 @@ namespace SabreTools.DatFiles
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Error(ex, $"Error with file '{currentPath}'");
|
||||
_staticLogger.Error(ex, $"Error with file '{currentPath}'");
|
||||
}
|
||||
|
||||
watch.Stop();
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace SabreTools.DatFiles
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
string message = $"'{filename}' - An error occurred during parsing";
|
||||
logger.Error(ex, message);
|
||||
_logger.Error(ex, message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,24 +43,24 @@ namespace SabreTools.DatFiles
|
||||
{
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
_logger.User($"Writing to '{outfile}'...");
|
||||
|
||||
// Serialize the input file in two steps
|
||||
var internalFormat = ConvertMetadata(ignoreblanks);
|
||||
var specificFormat = Activator.CreateInstance<TModelSerializer>().Deserialize(internalFormat);
|
||||
if (!Activator.CreateInstance<TFileSerializer>().Serialize(specificFormat, outfile))
|
||||
{
|
||||
logger.Warning($"File '{outfile}' could not be written! See the log for more details.");
|
||||
_logger.Warning($"File '{outfile}' could not be written! See the log for more details.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Error(ex);
|
||||
_logger.Error(ex);
|
||||
return false;
|
||||
}
|
||||
|
||||
logger.User($"'{outfile}' written!{Environment.NewLine}");
|
||||
_logger.User($"'{outfile}' written!{Environment.NewLine}");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -69,24 +69,24 @@ namespace SabreTools.DatFiles
|
||||
{
|
||||
try
|
||||
{
|
||||
logger.User($"Writing to '{outfile}'...");
|
||||
_logger.User($"Writing to '{outfile}'...");
|
||||
|
||||
// Serialize the input file in two steps
|
||||
var internalFormat = ConvertMetadataDB(ignoreblanks);
|
||||
var specificFormat = Activator.CreateInstance<TModelSerializer>().Deserialize(internalFormat);
|
||||
if (!Activator.CreateInstance<TFileSerializer>().Serialize(specificFormat, outfile))
|
||||
{
|
||||
logger.Warning($"File '{outfile}' could not be written! See the log for more details.");
|
||||
_logger.Warning($"File '{outfile}' could not be written! See the log for more details.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Error(ex);
|
||||
_logger.Error(ex);
|
||||
return false;
|
||||
}
|
||||
|
||||
logger.User($"'{outfile}' written!{Environment.NewLine}");
|
||||
_logger.User($"'{outfile}' written!{Environment.NewLine}");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ namespace SabreTools.DatItems
|
||||
/// Static logger for static methods
|
||||
/// </summary>
|
||||
[JsonIgnore, XmlIgnore]
|
||||
protected static readonly Logger staticLogger = new();
|
||||
protected static readonly Logger _staticLogger = new();
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace SabreTools.DatTools
|
||||
/// <summary>
|
||||
/// Logging object
|
||||
/// </summary>
|
||||
private readonly Logger logger = new();
|
||||
private readonly Logger _logger = new();
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -157,7 +157,7 @@ namespace SabreTools.DatTools
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Error(ex);
|
||||
_logger.Error(ex);
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace SabreTools.DatTools
|
||||
/// <summary>
|
||||
/// Logging object
|
||||
/// </summary>
|
||||
private static readonly Logger logger = new();
|
||||
private static readonly Logger _staticLogger = new();
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace SabreTools.DatTools
|
||||
// Process the input
|
||||
if (Directory.Exists(basePath))
|
||||
{
|
||||
logger.Verbose($"Folder found: {basePath}");
|
||||
_staticLogger.Verbose($"Folder found: {basePath}");
|
||||
|
||||
// Get a list of all files to process
|
||||
#if NET20 || NET35
|
||||
@@ -104,13 +104,13 @@ namespace SabreTools.DatTools
|
||||
#endif
|
||||
|
||||
// Process the files in the main folder or any subfolder
|
||||
logger.User(totalSize, currentSize);
|
||||
_staticLogger.User(totalSize, currentSize);
|
||||
foreach (string item in files)
|
||||
{
|
||||
currentSize += new FileInfo(item).Length;
|
||||
|
||||
CheckFileForHashes(datFile, item, basePath, asFile);
|
||||
logger.User(totalSize, currentSize, item);
|
||||
_staticLogger.User(totalSize, currentSize, item);
|
||||
}
|
||||
|
||||
// Now find all folders that are empty, if we are supposed to
|
||||
@@ -119,14 +119,14 @@ namespace SabreTools.DatTools
|
||||
}
|
||||
else if (System.IO.File.Exists(basePath))
|
||||
{
|
||||
logger.Verbose($"File found: {basePath}");
|
||||
_staticLogger.Verbose($"File found: {basePath}");
|
||||
|
||||
totalSize = new FileInfo(basePath).Length;
|
||||
logger.User(totalSize, currentSize);
|
||||
_staticLogger.User(totalSize, currentSize);
|
||||
|
||||
string? parentPath = Path.GetDirectoryName(Path.GetDirectoryName(basePath));
|
||||
CheckFileForHashes(datFile, basePath, parentPath, asFile);
|
||||
logger.User(totalSize, totalSize, basePath);
|
||||
_staticLogger.User(totalSize, totalSize, basePath);
|
||||
}
|
||||
|
||||
watch.Stop();
|
||||
@@ -231,11 +231,11 @@ namespace SabreTools.DatTools
|
||||
// Add the list if it doesn't exist already
|
||||
Rom rom = baseFile.ConvertToRom();
|
||||
datFile.Items.Add(rom.GetKey(ItemKey.CRC), rom);
|
||||
logger.Verbose($"File added: {Path.GetFileNameWithoutExtension(item)}");
|
||||
_staticLogger.Verbose($"File added: {Path.GetFileNameWithoutExtension(item)}");
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.Verbose($"File not added: {Path.GetFileNameWithoutExtension(item)}");
|
||||
_staticLogger.Verbose($"File not added: {Path.GetFileNameWithoutExtension(item)}");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -378,7 +378,7 @@ namespace SabreTools.DatTools
|
||||
gamename = gamename.Trim(Path.DirectorySeparatorChar);
|
||||
romname = romname.Trim(Path.DirectorySeparatorChar);
|
||||
|
||||
logger.Verbose($"Adding blank empty folder: {gamename}");
|
||||
_staticLogger.Verbose($"Adding blank empty folder: {gamename}");
|
||||
|
||||
var blankMachine = new Machine();
|
||||
blankMachine.SetFieldValue<string?>(Models.Metadata.Machine.NameKey, gamename);
|
||||
@@ -404,7 +404,7 @@ namespace SabreTools.DatTools
|
||||
/// <param name="asFile">TreatAsFile representing CHD and Archive scanning</param>
|
||||
private void ProcessFile(DatFile datFile, string item, string? basePath, TreatAsFile asFile)
|
||||
{
|
||||
logger.Verbose($"'{Path.GetFileName(item)}' treated like a file");
|
||||
_staticLogger.Verbose($"'{Path.GetFileName(item)}' treated like a file");
|
||||
var header = datFile.Header.GetStringFieldValue(Models.Metadata.Header.HeaderKey);
|
||||
BaseFile? baseFile = FileTypeTool.GetInfo(item, _hashes, header);
|
||||
DatItem? datItem = DatItemTool.CreateDatItem(baseFile, asFile);
|
||||
@@ -443,11 +443,11 @@ namespace SabreTools.DatTools
|
||||
string key = datItem.GetKey(ItemKey.CRC);
|
||||
datFile.Items.Add(key, datItem);
|
||||
|
||||
logger.Verbose($"File added: {datItem.GetName() ?? string.Empty}");
|
||||
_staticLogger.Verbose($"File added: {datItem.GetName() ?? string.Empty}");
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
logger.Error(ex);
|
||||
_staticLogger.Error(ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace SabreTools.DatTools
|
||||
/// <summary>
|
||||
/// Logging object
|
||||
/// </summary>
|
||||
private readonly Logger logger;
|
||||
private readonly Logger _logger;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace SabreTools.DatTools
|
||||
/// </summary>
|
||||
public ExtraIni()
|
||||
{
|
||||
logger = new Logger(this);
|
||||
_logger = new Logger(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -58,7 +58,7 @@ namespace SabreTools.DatTools
|
||||
// If we don't even have a possible field and file combination
|
||||
if (!input.Contains(":"))
|
||||
{
|
||||
logger.Warning($"'{input}` is not a valid INI extras string. Valid INI extras strings are of the form 'key:value'. Please refer to README.1ST or the help feature for more details.");
|
||||
_logger.Warning($"'{input}` is not a valid INI extras string. Valid INI extras strings are of the form 'key:value'. Please refer to README.1ST or the help feature for more details.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ namespace SabreTools.DatTools
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Error(ex);
|
||||
_logger.Error(ex);
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
@@ -192,7 +192,7 @@ namespace SabreTools.DatTools
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Error(ex);
|
||||
_logger.Error(ex);
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace SabreTools.DatTools
|
||||
/// <summary>
|
||||
/// Logging object
|
||||
/// </summary>
|
||||
private static readonly Logger logger = new();
|
||||
private static readonly Logger _staticLogger = new();
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace SabreTools.DatTools
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Error(ex);
|
||||
_staticLogger.Error(ex);
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
@@ -99,7 +99,7 @@ namespace SabreTools.DatTools
|
||||
/// <param name="datFile">Current DatFile object to run operations on</param>
|
||||
internal static void CreateDeviceNonMergedSets(DatFile datFile)
|
||||
{
|
||||
logger.User("Creating device non-merged sets from the DAT");
|
||||
_staticLogger.User("Creating device non-merged sets from the DAT");
|
||||
|
||||
// For sake of ease, the first thing we want to do is bucket by game
|
||||
datFile.Items.BucketBy(ItemKey.Machine, DedupeType.None, norename: true);
|
||||
@@ -122,7 +122,7 @@ namespace SabreTools.DatTools
|
||||
/// <param name="datFile">Current DatFile object to run operations on</param>
|
||||
internal static void CreateFullyMergedSets(DatFile datFile)
|
||||
{
|
||||
logger.User("Creating fully merged sets from the DAT");
|
||||
_staticLogger.User("Creating fully merged sets from the DAT");
|
||||
|
||||
// For sake of ease, the first thing we want to do is bucket by game
|
||||
datFile.Items.BucketBy(ItemKey.Machine, DedupeType.None, norename: true);
|
||||
@@ -149,7 +149,7 @@ namespace SabreTools.DatTools
|
||||
/// <param name="datFile">Current DatFile object to run operations on</param>
|
||||
internal static void CreateFullyNonMergedSets(DatFile datFile)
|
||||
{
|
||||
logger.User("Creating fully non-merged sets from the DAT");
|
||||
_staticLogger.User("Creating fully non-merged sets from the DAT");
|
||||
|
||||
// For sake of ease, the first thing we want to do is bucket by game
|
||||
datFile.Items.BucketBy(ItemKey.Machine, DedupeType.None, norename: true);
|
||||
@@ -178,7 +178,7 @@ namespace SabreTools.DatTools
|
||||
/// <param name="datFile">Current DatFile object to run operations on</param>
|
||||
internal static void CreateMergedSets(DatFile datFile)
|
||||
{
|
||||
logger.User("Creating merged sets from the DAT");
|
||||
_staticLogger.User("Creating merged sets from the DAT");
|
||||
|
||||
// For sake of ease, the first thing we want to do is bucket by game
|
||||
datFile.Items.BucketBy(ItemKey.Machine, DedupeType.None, norename: true);
|
||||
@@ -205,7 +205,7 @@ namespace SabreTools.DatTools
|
||||
/// <param name="datFile">Current DatFile object to run operations on</param>
|
||||
internal static void CreateNonMergedSets(DatFile datFile)
|
||||
{
|
||||
logger.User("Creating non-merged sets from the DAT");
|
||||
_staticLogger.User("Creating non-merged sets from the DAT");
|
||||
|
||||
// For sake of ease, the first thing we want to do is bucket by game
|
||||
datFile.Items.BucketBy(ItemKey.Machine, DedupeType.None, norename: true);
|
||||
@@ -232,7 +232,7 @@ namespace SabreTools.DatTools
|
||||
/// <param name="datFile">Current DatFile object to run operations on</param>
|
||||
internal static void CreateSplitSets(DatFile datFile)
|
||||
{
|
||||
logger.User("Creating split sets from the DAT");
|
||||
_staticLogger.User("Creating split sets from the DAT");
|
||||
|
||||
// For sake of ease, the first thing we want to do is bucket by game
|
||||
datFile.Items.BucketBy(ItemKey.Machine, DedupeType.None, norename: true);
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace SabreTools.DatTools
|
||||
/// <summary>
|
||||
/// Logging object
|
||||
/// </summary>
|
||||
private static readonly Logger logger = new();
|
||||
private static readonly Logger _staticLogger = new();
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace SabreTools.DatTools
|
||||
// If the DAT is not populated and inverse is not set, inform the user and quit
|
||||
if (datFile.Items.DatStatistics.TotalCount == 0 && !inverse)
|
||||
{
|
||||
logger.User("No entries were found to rebuild, exiting...");
|
||||
_staticLogger.User("No entries were found to rebuild, exiting...");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace SabreTools.DatTools
|
||||
// Add to the list if the input is a directory
|
||||
if (Directory.Exists(input))
|
||||
{
|
||||
logger.Verbose($"Adding depot: {input}");
|
||||
_staticLogger.Verbose($"Adding depot: {input}");
|
||||
lock (directories)
|
||||
{
|
||||
directories.Add(input);
|
||||
@@ -116,7 +116,7 @@ namespace SabreTools.DatTools
|
||||
if (hash.Length != Constants.SHA1Length)
|
||||
continue;
|
||||
|
||||
logger.User($"Checking hash '{hash}'");
|
||||
_staticLogger.User($"Checking hash '{hash}'");
|
||||
|
||||
// Get the extension path for the hash
|
||||
string? subpath = Utilities.GetDepotPath(hash, datFile.Header.GetFieldValue<DepotInformation?>(DatHeader.InputDepotKey)?.Depth ?? 0);
|
||||
@@ -206,7 +206,7 @@ namespace SabreTools.DatTools
|
||||
// If the DAT is not populated and inverse is not set, inform the user and quit
|
||||
if (datFile.Items.DatStatistics.TotalCount == 0 && !inverse)
|
||||
{
|
||||
logger.User("No entries were found to rebuild, exiting...");
|
||||
_staticLogger.User("No entries were found to rebuild, exiting...");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -238,7 +238,7 @@ namespace SabreTools.DatTools
|
||||
// If the input is a file
|
||||
if (System.IO.File.Exists(input))
|
||||
{
|
||||
logger.User($"Checking file: {input}");
|
||||
_staticLogger.User($"Checking file: {input}");
|
||||
bool rebuilt = RebuildGenericHelper(datFile, input, outDir, quickScan, date, inverse, outputFormat, asFile);
|
||||
|
||||
// If we are supposed to delete the file, do so
|
||||
@@ -249,14 +249,14 @@ namespace SabreTools.DatTools
|
||||
// If the input is a directory
|
||||
else if (Directory.Exists(input))
|
||||
{
|
||||
logger.Verbose($"Checking directory: {input}");
|
||||
_staticLogger.Verbose($"Checking directory: {input}");
|
||||
#if NET20 || NET35
|
||||
foreach (string file in Directory.GetFiles(input, "*"))
|
||||
#else
|
||||
foreach (string file in Directory.EnumerateFiles(input, "*", SearchOption.AllDirectories))
|
||||
#endif
|
||||
{
|
||||
logger.User($"Checking file: {file}");
|
||||
_staticLogger.User($"Checking file: {file}");
|
||||
bool rebuilt = RebuildGenericHelper(datFile, file, outDir, quickScan, date, inverse, outputFormat, asFile);
|
||||
|
||||
// If we are supposed to delete the file, do so
|
||||
@@ -443,7 +443,7 @@ namespace SabreTools.DatTools
|
||||
fileStream.Seek(0, SeekOrigin.Begin);
|
||||
}
|
||||
|
||||
logger.User($"{(inverse ? "No matches" : $"{dupes.Count} Matches")} found for '{Path.GetFileName(datItem.GetName() ?? datItem.GetStringFieldValue(Models.Metadata.DatItem.TypeKey).AsEnumValue<ItemType>().AsStringValue())}', rebuilding accordingly...");
|
||||
_staticLogger.User($"{(inverse ? "No matches" : $"{dupes.Count} Matches")} found for '{Path.GetFileName(datItem.GetName() ?? datItem.GetStringFieldValue(Models.Metadata.DatItem.TypeKey).AsEnumValue<ItemType>().AsStringValue())}', rebuilding accordingly...");
|
||||
rebuilt = true;
|
||||
|
||||
// Special case for partial packing mode
|
||||
@@ -506,7 +506,7 @@ namespace SabreTools.DatTools
|
||||
if (ShouldRebuild(datFile, headerless, transformStream, false, out dupes))
|
||||
//if (ShouldRebuildDB(datFile, headerless, transformStream, false, out dupes))
|
||||
{
|
||||
logger.User($"Headerless matches found for '{Path.GetFileName(datItem.GetName() ?? datItem.GetStringFieldValue(Models.Metadata.DatItem.TypeKey).AsEnumValue<ItemType>().AsStringValue())}', rebuilding accordingly...");
|
||||
_staticLogger.User($"Headerless matches found for '{Path.GetFileName(datItem.GetName() ?? datItem.GetStringFieldValue(Models.Metadata.DatItem.TypeKey).AsEnumValue<ItemType>().AsStringValue())}', rebuilding accordingly...");
|
||||
rebuilt = true;
|
||||
|
||||
// Now loop through the list and rebuild accordingly
|
||||
@@ -677,7 +677,7 @@ namespace SabreTools.DatTools
|
||||
BaseFile? tgzRom = tgz.GetTorrentGZFileInfo();
|
||||
if (isZip == false && tgzRom != null && (outputFormat == OutputFormat.TorrentGzip || outputFormat == OutputFormat.TorrentGzipRomba))
|
||||
{
|
||||
logger.User($"Matches found for '{Path.GetFileName(datItem.GetName() ?? string.Empty)}', rebuilding accordingly...");
|
||||
_staticLogger.User($"Matches found for '{Path.GetFileName(datItem.GetName() ?? string.Empty)}', rebuilding accordingly...");
|
||||
|
||||
// Get the proper output path
|
||||
string sha1 = (datItem as Rom)!.GetStringFieldValue(Models.Metadata.Rom.SHA1Key) ?? string.Empty;
|
||||
@@ -723,7 +723,7 @@ namespace SabreTools.DatTools
|
||||
BaseFile? txzRom = txz.GetTorrentXZFileInfo();
|
||||
if (isZip == false && txzRom != null && (outputFormat == OutputFormat.TorrentXZ || outputFormat == OutputFormat.TorrentXZRomba))
|
||||
{
|
||||
logger.User($"Matches found for '{Path.GetFileName(datItem.GetName() ?? string.Empty)}', rebuilding accordingly...");
|
||||
_staticLogger.User($"Matches found for '{Path.GetFileName(datItem.GetName() ?? string.Empty)}', rebuilding accordingly...");
|
||||
|
||||
// Get the proper output path
|
||||
string sha1 = (datItem as Rom)!.GetStringFieldValue(Models.Metadata.Rom.SHA1Key) ?? string.Empty;
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace SabreTools.DatTools
|
||||
/// <summary>
|
||||
/// Logging object
|
||||
/// </summary>
|
||||
protected Logger logger;
|
||||
protected Logger _logger;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace SabreTools.DatTools
|
||||
/// </summary>
|
||||
public Remover()
|
||||
{
|
||||
logger = new Logger(this);
|
||||
_logger = new Logger(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -75,7 +75,7 @@ namespace SabreTools.DatTools
|
||||
{
|
||||
bool removerSet = SetRemover(field);
|
||||
if (!removerSet)
|
||||
logger.Warning($"The value {field} did not match any known field names. Please check the wiki for more details on supported field names.");
|
||||
_logger.Warning($"The value {field} did not match any known field names. Please check the wiki for more details on supported field names.");
|
||||
}
|
||||
|
||||
watch.Stop();
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace SabreTools.DatTools
|
||||
/// <summary>
|
||||
/// Logging object
|
||||
/// </summary>
|
||||
private readonly Logger logger = new();
|
||||
private readonly Logger _logger = new();
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace SabreTools.DatTools
|
||||
string value = values[i];
|
||||
|
||||
if (!SetSetter(field, value))
|
||||
logger.Warning($"The value {value} did not match any known field names. Please check the wiki for more details on supported field names.");
|
||||
_logger.Warning($"The value {value} did not match any known field names. Please check the wiki for more details on supported field names.");
|
||||
}
|
||||
|
||||
watch.Stop();
|
||||
@@ -97,7 +97,7 @@ namespace SabreTools.DatTools
|
||||
string value = mapping.Value;
|
||||
|
||||
if (!SetSetter(field, value))
|
||||
logger.Warning($"The value {value} did not match any known field names. Please check the wiki for more details on supported field names.");
|
||||
_logger.Warning($"The value {value} did not match any known field names. Please check the wiki for more details on supported field names.");
|
||||
}
|
||||
|
||||
watch.Stop();
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace SabreTools.DatTools
|
||||
/// <summary>
|
||||
/// Logging object
|
||||
/// </summary>
|
||||
private static readonly Logger logger = new();
|
||||
private static readonly Logger _staticLogger = new();
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -784,7 +784,7 @@ namespace SabreTools.DatTools
|
||||
var items = datFile.Items[machine];
|
||||
if (items == null || items.Count == 0)
|
||||
{
|
||||
logger.Error($"{machine} contains no items and will be skipped");
|
||||
_staticLogger.Error($"{machine} contains no items and will be skipped");
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -797,7 +797,7 @@ namespace SabreTools.DatTools
|
||||
// TODO: Should there be more than just a log if a single item is larger than the chunksize?
|
||||
machineSize += rom.GetInt64FieldValue(Models.Metadata.Rom.SizeKey) ?? 0;
|
||||
if ((rom.GetInt64FieldValue(Models.Metadata.Rom.SizeKey) ?? 0) > chunkSize)
|
||||
logger.Error($"{rom.GetName() ?? string.Empty} in {machine} is larger than {chunkSize}");
|
||||
_staticLogger.Error($"{rom.GetName() ?? string.Empty} in {machine} is larger than {chunkSize}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -805,7 +805,7 @@ namespace SabreTools.DatTools
|
||||
// TODO: Should this eventually try to split the machine here?
|
||||
if (machineSize > chunkSize)
|
||||
{
|
||||
logger.Error($"{machine} is larger than {chunkSize} and will be skipped");
|
||||
_staticLogger.Error($"{machine} is larger than {chunkSize} and will be skipped");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace SabreTools.DatTools
|
||||
/// <summary>
|
||||
/// Logging object
|
||||
/// </summary>
|
||||
private static readonly Logger logger = new();
|
||||
private static readonly Logger _staticLogger = new();
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace SabreTools.DatTools
|
||||
// If there's no output format, set the default
|
||||
if (statDatFormat == StatReportFormat.None)
|
||||
{
|
||||
logger.Verbose("No report format defined, defaulting to textfile");
|
||||
_staticLogger.Verbose("No report format defined, defaulting to textfile");
|
||||
statDatFormat = StatReportFormat.Textfile;
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ namespace SabreTools.DatTools
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Error(ex, $"Report '{outfile}' could not be written out");
|
||||
_staticLogger.Error(ex, $"Report '{outfile}' could not be written out");
|
||||
}
|
||||
#if NET40_OR_GREATER || NETCOREAPP
|
||||
});
|
||||
@@ -189,7 +189,7 @@ namespace SabreTools.DatTools
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Error(ex);
|
||||
_staticLogger.Error(ex);
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace SabreTools.DatTools
|
||||
/// <summary>
|
||||
/// Logging object
|
||||
/// </summary>
|
||||
private static readonly Logger logger = new();
|
||||
private static readonly Logger _staticLogger = new();
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace SabreTools.DatTools
|
||||
// Add to the list if the input is a directory
|
||||
if (Directory.Exists(input))
|
||||
{
|
||||
logger.Verbose($"Adding depot: {input}");
|
||||
_staticLogger.Verbose($"Adding depot: {input}");
|
||||
directories.Add(input);
|
||||
}
|
||||
}
|
||||
@@ -65,7 +65,7 @@ namespace SabreTools.DatTools
|
||||
if (hash.Length != Constants.SHA1Length)
|
||||
continue;
|
||||
|
||||
logger.User($"Checking hash '{hash}'");
|
||||
_staticLogger.User($"Checking hash '{hash}'");
|
||||
|
||||
// Get the extension path for the hash
|
||||
string? subpath = Utilities.GetDepotPath(hash, datFile.Header.GetFieldValue<DepotInformation?>(DatHeader.InputDepotKey)?.Depth ?? 0);
|
||||
@@ -130,7 +130,7 @@ namespace SabreTools.DatTools
|
||||
// Add to the list if the input is a directory
|
||||
if (Directory.Exists(input))
|
||||
{
|
||||
logger.Verbose($"Adding depot: {input}");
|
||||
_staticLogger.Verbose($"Adding depot: {input}");
|
||||
directories.Add(input);
|
||||
}
|
||||
}
|
||||
@@ -150,7 +150,7 @@ namespace SabreTools.DatTools
|
||||
if (hash.Length != Constants.SHA1Length)
|
||||
continue;
|
||||
|
||||
logger.User($"Checking hash '{hash}'");
|
||||
_staticLogger.User($"Checking hash '{hash}'");
|
||||
|
||||
// Get the extension path for the hash
|
||||
string? subpath = Utilities.GetDepotPath(hash, datFile.Header.GetFieldValue<DepotInformation?>(DatHeader.InputDepotKey)?.Depth ?? 0);
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace SabreTools.DatTools
|
||||
/// <summary>
|
||||
/// Logging object
|
||||
/// </summary>
|
||||
private static readonly Logger logger = new();
|
||||
private static readonly Logger _staticLogger = new();
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace SabreTools.DatTools
|
||||
// If we have nothing writable, abort
|
||||
if (!HasWritable(datFile))
|
||||
{
|
||||
logger.User("There were no items to write out!");
|
||||
_staticLogger.User("There were no items to write out!");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace SabreTools.DatTools
|
||||
// If the DAT has no output format, default to XML
|
||||
if (datFile.Header.GetFieldValue<DatFormat>(DatHeader.DatFormatKey) == 0)
|
||||
{
|
||||
logger.Verbose("No DAT format defined, defaulting to XML");
|
||||
_staticLogger.Verbose("No DAT format defined, defaulting to XML");
|
||||
datFile.Header.SetFieldValue<DatFormat>(DatHeader.DatFormatKey, DatFormat.Logiqx);
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace SabreTools.DatTools
|
||||
datFile.ItemsDB.BucketBy(ItemKey.Machine, DedupeType.None);
|
||||
|
||||
// Output the number of items we're going to be writing
|
||||
logger.User($"A total of {datFile.Items.DatStatistics.TotalCount - datFile.Items.DatStatistics.RemovedCount} items will be written out to '{datFile.Header.GetStringFieldValue(DatHeader.FileNameKey)}'");
|
||||
_staticLogger.User($"A total of {datFile.Items.DatStatistics.TotalCount - datFile.Items.DatStatistics.RemovedCount} items will be written out to '{datFile.Header.GetStringFieldValue(DatHeader.FileNameKey)}'");
|
||||
//logger.User($"A total of {datFile.ItemsDB.DatStatistics.TotalCount - datFile.ItemsDB.DatStatistics.RemovedCount} items will be written out to '{datFile.Header.GetStringFieldValue(DatHeader.FileNameKey)}'");
|
||||
|
||||
// Get the outfile names
|
||||
@@ -94,7 +94,7 @@ namespace SabreTools.DatTools
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Error(ex, $"Datfile '{outfile}' could not be written out");
|
||||
_staticLogger.Error(ex, $"Datfile '{outfile}' could not be written out");
|
||||
}
|
||||
#if NET40_OR_GREATER || NETCOREAPP
|
||||
});
|
||||
@@ -104,7 +104,7 @@ namespace SabreTools.DatTools
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Error(ex);
|
||||
_staticLogger.Error(ex);
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace SabreTools.FileTypes
|
||||
/// <summary>
|
||||
/// Logging object
|
||||
/// </summary>
|
||||
private static readonly Logger _logger = new();
|
||||
private static readonly Logger _staticLogger = new();
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace SabreTools.FileTypes
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Error(ex);
|
||||
_staticLogger.Error(ex);
|
||||
return new BaseFile();
|
||||
}
|
||||
}
|
||||
@@ -110,7 +110,7 @@ namespace SabreTools.FileTypes
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Error(ex);
|
||||
_staticLogger.Error(ex);
|
||||
return new BaseFile();
|
||||
}
|
||||
}
|
||||
@@ -258,7 +258,7 @@ namespace SabreTools.FileTypes
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Error(ex);
|
||||
_staticLogger.Error(ex);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace SabreTools.Help
|
||||
/// <summary>
|
||||
/// Logging object
|
||||
/// </summary>
|
||||
private readonly Logger logger;
|
||||
private readonly Logger _logger;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace SabreTools.Help
|
||||
/// </summary>
|
||||
public TopLevel()
|
||||
{
|
||||
logger = new Logger(this);
|
||||
_logger = new Logger(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -72,7 +72,7 @@ namespace SabreTools.Help
|
||||
// Everything else isn't a file
|
||||
else
|
||||
{
|
||||
logger.Error($"Invalid input detected: {args[i]}");
|
||||
_logger.Error($"Invalid input detected: {args[i]}");
|
||||
help.OutputIndividualFeature(Name);
|
||||
LoggerImpl.Close();
|
||||
return false;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace SabreTools.Reports
|
||||
/// <summary>
|
||||
/// Logging object
|
||||
/// </summary>
|
||||
protected readonly Logger logger = new();
|
||||
protected readonly Logger _logger = new();
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace SabreTools.Reports.Formats
|
||||
FileStream fs = File.Create(outfile ?? string.Empty);
|
||||
if (fs == null)
|
||||
{
|
||||
logger.Warning($"File '{outfile}' could not be created for writing! Please check to see if the file is writable");
|
||||
_logger.Warning($"File '{outfile}' could not be created for writing! Please check to see if the file is writable");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace SabreTools.Reports.Formats
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Error(ex);
|
||||
_logger.Error(ex);
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace SabreTools.Reports.Formats
|
||||
FileStream fs = File.Create(outfile ?? string.Empty);
|
||||
if (fs == null)
|
||||
{
|
||||
logger.Warning($"File '{outfile}' could not be created for writing! Please check to see if the file is writable");
|
||||
_logger.Warning($"File '{outfile}' could not be created for writing! Please check to see if the file is writable");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace SabreTools.Reports.Formats
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Error(ex);
|
||||
_logger.Error(ex);
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace SabreTools.Reports.Formats
|
||||
Stream fs = _writeToConsole ? Console.OpenStandardOutput() : File.Create(outfile ?? string.Empty);
|
||||
if (fs == null)
|
||||
{
|
||||
logger.Warning($"File '{outfile}' could not be created for writing! Please check to see if the file is writable");
|
||||
_logger.Warning($"File '{outfile}' could not be created for writing! Please check to see if the file is writable");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace SabreTools.Reports.Formats
|
||||
}
|
||||
catch (Exception ex) when (!throwOnError)
|
||||
{
|
||||
logger.Error(ex);
|
||||
_logger.Error(ex);
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace SabreTools.Features
|
||||
/// <summary>
|
||||
/// Logging object
|
||||
/// </summary>
|
||||
protected Logger logger = new();
|
||||
protected Logger _logger = new();
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -2176,7 +2176,7 @@ Some special strings that can be used:
|
||||
DatFormat dftemp = GetDatFormat(ot);
|
||||
if (dftemp == 0x00)
|
||||
{
|
||||
logger.Error($"{ot} is not a recognized DAT format");
|
||||
_logger.Error($"{ot} is not a recognized DAT format");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ Reset the internal state: reset();";
|
||||
// If the file doesn't exist, warn but continue
|
||||
if (!File.Exists(path))
|
||||
{
|
||||
logger.User($"{path} does not exist. Skipping...");
|
||||
_logger.User($"{path} does not exist. Skipping...");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -102,8 +102,8 @@ Reset the internal state: reset();";
|
||||
var command = BatchCommand.Create(line);
|
||||
if (command == null)
|
||||
{
|
||||
logger.User($"Could not process {path} due to the following line: {line}");
|
||||
logger.User($"Please see the help text for more details about possible commands");
|
||||
_logger.User($"Could not process {path} due to the following line: {line}");
|
||||
_logger.User($"Please see the help text for more details about possible commands");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -111,19 +111,19 @@ Reset the internal state: reset();";
|
||||
(bool valid, string? error) = command.ValidateArguments();
|
||||
if (!valid)
|
||||
{
|
||||
logger.User(error ?? string.Empty);
|
||||
logger.User($"Usage: {command.Usage()}");
|
||||
_logger.User(error ?? string.Empty);
|
||||
_logger.User($"Usage: {command.Usage()}");
|
||||
break;
|
||||
}
|
||||
|
||||
// Now run the command
|
||||
logger.User($"Attempting to invoke {command.Name} with {(command.Arguments.Length == 0 ? "no arguments" : "the following argument(s): " + string.Join(", ", command.Arguments))}");
|
||||
_logger.User($"Attempting to invoke {command.Name} with {(command.Arguments.Length == 0 ? "no arguments" : "the following argument(s): " + string.Join(", ", command.Arguments))}");
|
||||
command.Process(batchState);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.Error(ex, $"There was an exception processing {path}");
|
||||
_logger.Error(ex, $"There was an exception processing {path}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace SabreTools.Features
|
||||
SplittingMode splittingMode = GetSplittingMode(features);
|
||||
if (splittingMode == SplittingMode.None)
|
||||
{
|
||||
logger.Error("No valid splitting mode found!");
|
||||
_logger.Error("No valid splitting mode found!");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ namespace SabreTools.Features
|
||||
if (splittingMode.HasFlag(SplittingMode.Level))
|
||||
#endif
|
||||
{
|
||||
logger.Warning("This feature is not implemented: level-split");
|
||||
_logger.Warning("This feature is not implemented: level-split");
|
||||
DatTools.Splitter.SplitByLevel(
|
||||
internalDat,
|
||||
OutputDir!,
|
||||
@@ -164,7 +164,7 @@ namespace SabreTools.Features
|
||||
if (splittingMode.HasFlag(SplittingMode.TotalSize))
|
||||
#endif
|
||||
{
|
||||
logger.Warning("This feature is not implemented: level-split");
|
||||
_logger.Warning("This feature is not implemented: level-split");
|
||||
List<DatFile> sizedDats = DatTools.Splitter.SplitByTotalSize(internalDat, GetInt64(features, ChunkSizeInt64Value));
|
||||
|
||||
var watch = new InternalStopwatch("Outputting total-size-split DATs");
|
||||
|
||||
@@ -169,7 +169,7 @@ namespace SabreTools.Features
|
||||
{
|
||||
// Create a new base DatFile
|
||||
DatFile datFile = DatFile.Create(Header);
|
||||
logger.User($"Processing '{Path.GetFileName(inputPath.CurrentPath)}'");
|
||||
_logger.User($"Processing '{Path.GetFileName(inputPath.CurrentPath)}'");
|
||||
|
||||
// Check the current format
|
||||
DatFormat currentFormat = datFile.Header.GetFieldValue<DatFormat>(DatHeader.DatFormatKey);
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace SabreTools.Features
|
||||
else
|
||||
{
|
||||
// Loop through and add the inputs to check against
|
||||
logger.User("Processing files:\n");
|
||||
_logger.User("Processing files:\n");
|
||||
foreach (string input in Inputs)
|
||||
{
|
||||
dfd.PopulateFromDir(datdata, input, asFile);
|
||||
@@ -144,7 +144,7 @@ namespace SabreTools.Features
|
||||
else
|
||||
{
|
||||
// Loop through and add the inputs to check against
|
||||
logger.User("Processing files:\n");
|
||||
_logger.User("Processing files:\n");
|
||||
foreach (string input in Inputs)
|
||||
{
|
||||
dfd.PopulateFromDir(datdata, input, asFile);
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace SabreTools.Features
|
||||
if (!base.ProcessFeatures(features))
|
||||
return false;
|
||||
|
||||
logger.User($"SabreTools version: {Globals.Version}");
|
||||
_logger.User($"SabreTools version: {Globals.Version}");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace SabreTools
|
||||
/// <summary>
|
||||
/// Logging object
|
||||
/// </summary>
|
||||
private static readonly Logger logger = new();
|
||||
private static readonly Logger _staticLogger = new();
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -74,12 +74,12 @@ namespace SabreTools
|
||||
// TODO: Re-evaluate feature flags with this change in mind
|
||||
featureName = featureName.TrimStart('-');
|
||||
if (args[0].StartsWith("-"))
|
||||
logger.User($"Feature flags no longer require leading '-' characters");
|
||||
_staticLogger.User($"Feature flags no longer require leading '-' characters");
|
||||
|
||||
// Verify that the flag is valid
|
||||
if (!_help.TopLevelFlag(featureName))
|
||||
{
|
||||
logger.User($"'{featureName}' is not valid feature flag");
|
||||
_staticLogger.User($"'{featureName}' is not valid feature flag");
|
||||
_help.OutputIndividualFeature(featureName);
|
||||
LoggerImpl.Close();
|
||||
return;
|
||||
@@ -154,7 +154,7 @@ namespace SabreTools
|
||||
// If the feature failed, output help
|
||||
if (!success)
|
||||
{
|
||||
logger.Error("An error occurred during processing!");
|
||||
_staticLogger.Error("An error occurred during processing!");
|
||||
_help.OutputIndividualFeature(featureName);
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ namespace SabreTools
|
||||
{
|
||||
if (inputs.Count == 0)
|
||||
{
|
||||
logger.Error("This feature requires at least one input");
|
||||
_staticLogger.Error("This feature requires at least one input");
|
||||
_help?.OutputIndividualFeature(feature.Name);
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user