Use custom logger everywhere.

This commit is contained in:
Ottermandias 2022-09-15 15:02:23 +02:00
parent fabbeeae13
commit 72ef666d51
87 changed files with 276 additions and 371 deletions

View file

@ -1,13 +1,11 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.CompilerServices;
using System.Threading;
using Dalamud.Logging;
using OtterGui.Classes;
using Penumbra.GameData.ByteString;
using Penumbra.Meta.Manager;
using Penumbra.Mods;
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Threading;
namespace Penumbra.Collections;
@ -29,7 +27,7 @@ public partial class ModCollection
if( _cache == null )
{
CalculateEffectiveFileList();
PluginLog.Verbose( "Created new cache for collection {Name:l}.", Name );
Penumbra.Log.Verbose( $"Created new cache for collection {Name}." );
}
}
@ -61,7 +59,7 @@ public partial class ModCollection
{
_cache?.Dispose();
_cache = null;
PluginLog.Verbose( "Cleared cache of collection {Name:l}.", Name );
Penumbra.Log.Verbose( $"Cleared cache of collection {Name}." );
}
public IEnumerable< Utf8GamePath > ReverseResolvePath( FullPath path )
@ -87,7 +85,7 @@ public partial class ModCollection
return true;
}
PluginLog.Error( $"The redirected path is too long to add the redirection\n\t{path}\n\t--> {fullPath}" );
Penumbra.Log.Error( $"The redirected path is too long to add the redirection\n\t{path}\n\t--> {fullPath}" );
return false;
}
@ -125,13 +123,11 @@ public partial class ModCollection
return;
}
PluginLog.Debug( "[{Thread}] Recalculating effective file list for {CollectionName:l}",
Thread.CurrentThread.ManagedThreadId, AnonymizedName );
Penumbra.Log.Debug( $"[{Thread.CurrentThread.ManagedThreadId}] Recalculating effective file list for {AnonymizedName}" );
_cache ??= new Cache( this );
_cache.FullRecalculation();
PluginLog.Debug( "[{Thread}] Recalculation of effective file list for {CollectionName:l} finished.",
Thread.CurrentThread.ManagedThreadId, AnonymizedName );
Penumbra.Log.Debug( $"[{Thread.CurrentThread.ManagedThreadId}] Recalculation of effective file list for {AnonymizedName} finished." );
}
// Set Metadata files.
@ -204,7 +200,7 @@ public partial class ModCollection
else
{
_cache.MetaManipulations.SetFiles();
PluginLog.Debug( "Set CharacterUtility resources for collection {Name:l}.", Name );
Penumbra.Log.Debug( $"Set CharacterUtility resources for collection {Name}." );
}
}
}