diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2025-07-04 12:13:01 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2025-07-04 21:17:55 +0200 |
commit | 1debcc8032f01dd2bb64f2725143121b57320876 (patch) | |
tree | 85cba14f5309a487913c0c430811273343211f8f /src/resources/animation.cpp | |
parent | 3fb53be63095dad2ebcfd52d44f13d20f630e478 (diff) | |
download | mana-1debcc8032f01dd2bb64f2725143121b57320876.tar.gz mana-1debcc8032f01dd2bb64f2725143121b57320876.tar.bz2 mana-1debcc8032f01dd2bb64f2725143121b57320876.tar.xz mana-1debcc8032f01dd2bb64f2725143121b57320876.zip |
Added logging priorities and use SDLs logging facilities
By using SDL logging, we can rely on SDL to filter the log messages by
their priority before they get sent to our custom output function. For
example, we now no longer get entries for created and destroyed Window
instances by default, since these have only "debug" priority whereas the
default priority for the "app" category is "info".
We can also get log messages raised by SDL itself in our log now. Log
levels can be controlled per category through the "SDL_LOGGING"
environment variable.
Many existing log messages have been assigned a category based on their
existing prefix.
Diffstat (limited to 'src/resources/animation.cpp')
-rw-r--r-- | src/resources/animation.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/resources/animation.cpp b/src/resources/animation.cpp index 91c22236..c529400f 100644 --- a/src/resources/animation.cpp +++ b/src/resources/animation.cpp @@ -84,7 +84,7 @@ Animation Animation::fromXML(XML::Node node, const std::string &dyePalettes) if (index < 0) { - logger->log("No valid value for 'index'"); + Log::info("No valid value for 'index'"); continue; } @@ -92,7 +92,7 @@ Animation Animation::fromXML(XML::Node node, const std::string &dyePalettes) if (!img) { - logger->log("No image at index %d", index); + Log::info("No image at index %d", index); continue; } @@ -105,7 +105,7 @@ Animation Animation::fromXML(XML::Node node, const std::string &dyePalettes) if (start < 0 || end < 0) { - logger->log("No valid value for 'start' or 'end'"); + Log::info("No valid value for 'start' or 'end'"); continue; } @@ -115,7 +115,7 @@ Animation Animation::fromXML(XML::Node node, const std::string &dyePalettes) if (!img) { - logger->log("No image at index %d", start); + Log::info("No image at index %d", start); continue; } |