修改日志输出等级

This commit is contained in:
ww-rm
2025-11-03 18:09:05 +08:00
parent decbb10fcb
commit c68a91fe3f
26 changed files with 77 additions and 77 deletions

View File

@@ -92,7 +92,7 @@ namespace Spine.Exporters
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_logger.Error("Failed to export {0} {1}, {2}", _format, output, ex.Message);
}
}

View File

@@ -144,7 +144,7 @@ namespace Spine.Exporters
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_logger.Error("Failed to export {0} {1}, {2}", _format, output, ex.Message);
}
}

View File

@@ -47,7 +47,7 @@ namespace Spine.Exporters
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_logger.Error("Failed to save frame {0}, {1}", savePath, ex.Message);
}
finally

View File

@@ -36,7 +36,7 @@ namespace Spine.Implementations.V21
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load atlas '{atlasPath}'");
}
@@ -50,7 +50,7 @@ namespace Spine.Implementations.V21
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonBinary(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -62,7 +62,7 @@ namespace Spine.Implementations.V21
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonJson(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -70,7 +70,7 @@ namespace Spine.Implementations.V21
catch (Exception ex)
{
_atlas.Dispose();
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load skeleton file {skelPath}");
}

View File

@@ -36,7 +36,7 @@ namespace Spine.Implementations.V34
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load atlas '{atlasPath}'");
}
@@ -50,7 +50,7 @@ namespace Spine.Implementations.V34
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonBinary(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -62,7 +62,7 @@ namespace Spine.Implementations.V34
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonJson(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -70,7 +70,7 @@ namespace Spine.Implementations.V34
catch (Exception ex)
{
_atlas.Dispose();
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load skeleton file {skelPath}");
}

View File

@@ -36,7 +36,7 @@ namespace Spine.Implementations.V35
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load atlas '{atlasPath}'");
}
@@ -50,7 +50,7 @@ namespace Spine.Implementations.V35
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonBinary(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -62,7 +62,7 @@ namespace Spine.Implementations.V35
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonJson(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -70,7 +70,7 @@ namespace Spine.Implementations.V35
catch (Exception ex)
{
_atlas.Dispose();
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load skeleton file {skelPath}");
}

View File

@@ -36,7 +36,7 @@ namespace Spine.Implementations.V36
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load atlas '{atlasPath}'");
}
@@ -50,7 +50,7 @@ namespace Spine.Implementations.V36
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonBinary(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -62,7 +62,7 @@ namespace Spine.Implementations.V36
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonJson(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -70,7 +70,7 @@ namespace Spine.Implementations.V36
catch (Exception ex)
{
_atlas.Dispose();
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load skeleton file {skelPath}");
}

View File

@@ -36,7 +36,7 @@ namespace Spine.Implementations.V37
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load atlas '{atlasPath}'");
}
@@ -50,7 +50,7 @@ namespace Spine.Implementations.V37
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonBinary(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -62,7 +62,7 @@ namespace Spine.Implementations.V37
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonJson(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -70,7 +70,7 @@ namespace Spine.Implementations.V37
catch (Exception ex)
{
_atlas.Dispose();
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load skeleton file {skelPath}");
}

View File

@@ -37,7 +37,7 @@ namespace Spine.Implementations.V38
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load atlas '{atlasPath}'");
}
@@ -51,7 +51,7 @@ namespace Spine.Implementations.V38
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonBinary(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -63,7 +63,7 @@ namespace Spine.Implementations.V38
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonJson(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -71,7 +71,7 @@ namespace Spine.Implementations.V38
catch (Exception ex)
{
_atlas.Dispose();
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load skeleton file {skelPath}");
}

View File

@@ -36,7 +36,7 @@ namespace Spine.Implementations.V40
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load atlas '{atlasPath}'");
}
@@ -50,7 +50,7 @@ namespace Spine.Implementations.V40
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonBinary(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -62,7 +62,7 @@ namespace Spine.Implementations.V40
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonJson(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -70,7 +70,7 @@ namespace Spine.Implementations.V40
catch (Exception ex)
{
_atlas.Dispose();
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load skeleton file {skelPath}");
}

View File

@@ -36,7 +36,7 @@ namespace Spine.Implementations.V41
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load atlas '{atlasPath}'");
}
@@ -50,7 +50,7 @@ namespace Spine.Implementations.V41
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonBinary(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -62,7 +62,7 @@ namespace Spine.Implementations.V41
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonJson(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -70,7 +70,7 @@ namespace Spine.Implementations.V41
catch (Exception ex)
{
_atlas.Dispose();
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load skeleton file {skelPath}");
}

View File

@@ -36,7 +36,7 @@ namespace Spine.Implementations.V42
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load atlas '{atlasPath}'");
}
@@ -50,7 +50,7 @@ namespace Spine.Implementations.V42
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonBinary(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -62,7 +62,7 @@ namespace Spine.Implementations.V42
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_skeletonData = new SkeletonJson(_atlas).ReadSkeletonData(skelPath);
}
}
@@ -70,7 +70,7 @@ namespace Spine.Implementations.V42
catch (Exception ex)
{
_atlas.Dispose();
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load skeleton file {skelPath}");
}

View File

@@ -269,7 +269,7 @@ namespace Spine
if (hit && LogHitSlots)
{
_logger.Debug("Hit ({0}): [{1}]", self.Name, hitSlotName);
_logger.Info("Hit ({0}): [{1}]", self.Name, hitSlotName);
}
return hit;
}

View File

@@ -82,7 +82,7 @@ namespace Spine
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
_logger.Warn("Failed to detect version for skel {0}, try all available versions", skelPath);
}
}
@@ -118,7 +118,7 @@ namespace Spine
}
catch (Exception ex)
{
_logger.Trace(ex.ToString());
_logger.Debug(ex.ToString());
throw new InvalidDataException($"Failed to load spine with version '{version}'");
}
}