mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Wire up source for logging where possible
This commit is contained in:
@@ -380,7 +380,13 @@ namespace SabreTools.Library.DatItems
|
||||
/// Logging object
|
||||
/// </summary>
|
||||
[JsonIgnore, XmlIgnore]
|
||||
protected static Logger logger = new Logger();
|
||||
protected Logger logger;
|
||||
|
||||
/// <summary>
|
||||
/// Static logger for static methods
|
||||
/// </summary>
|
||||
[JsonIgnore, XmlIgnore]
|
||||
protected static Logger staticLogger = new Logger();
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -414,6 +420,14 @@ namespace SabreTools.Library.DatItems
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public DatItem()
|
||||
{
|
||||
logger = new Logger(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a specific type of DatItem to be used based on an ItemType
|
||||
/// </summary>
|
||||
@@ -1027,14 +1041,14 @@ namespace SabreTools.Library.DatItems
|
||||
// If the current item exactly matches the last item, then we don't add it
|
||||
if (datItem.GetDuplicateStatus(lastItem).HasFlag(DupeType.All))
|
||||
{
|
||||
logger.Verbose($"Exact duplicate found for '{datItemName}'");
|
||||
staticLogger.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}'");
|
||||
staticLogger.Verbose($"Name duplicate found for '{datItemName}'");
|
||||
|
||||
if (datItem.ItemType == ItemType.Disk || datItem.ItemType == ItemType.Media || datItem.ItemType == ItemType.Rom)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user