From 27c153c8d2bcb396ff7d7fc3467729f1125c98d5 Mon Sep 17 00:00:00 2001 From: Argent77 <4519923+Argent77@users.noreply.github.com> Date: Tue, 3 Sep 2024 23:34:51 +0200 Subject: [PATCH] Add option "Application Log Level" to preferences This option controls the minimum severity level for log messages to be printed to the console. Option can be found in Preferences > GUI and Text section. --- src/org/infinity/AppOption.java | 4 + src/org/infinity/NearInfinity.java | 3 +- src/org/infinity/check/BCSIDSChecker.java | 2 +- src/org/infinity/check/CreInvChecker.java | 2 +- src/org/infinity/check/DialogChecker.java | 2 +- .../infinity/check/ResourceUseChecker.java | 2 +- src/org/infinity/check/ScriptChecker.java | 2 +- src/org/infinity/check/StringUseChecker.java | 2 +- .../check/StringValidationChecker.java | 2 +- .../infinity/check/StrrefIndexChecker.java | 2 +- src/org/infinity/check/StructChecker.java | 2 +- src/org/infinity/datatype/Bestiary.java | 2 +- src/org/infinity/datatype/ColorPicker.java | 2 +- src/org/infinity/datatype/ColorValue.java | 2 +- src/org/infinity/datatype/Datatype.java | 2 +- src/org/infinity/datatype/DecNumber.java | 2 +- src/org/infinity/datatype/EffectType.java | 2 +- src/org/infinity/datatype/FloatNumber.java | 2 +- src/org/infinity/datatype/HexNumber.java | 2 +- src/org/infinity/datatype/ItemTypeBitmap.java | 2 +- src/org/infinity/datatype/MultiNumber.java | 2 +- src/org/infinity/datatype/ResourceRef.java | 2 +- src/org/infinity/datatype/SpellProtType.java | 2 +- src/org/infinity/datatype/StringRef.java | 2 +- .../infinity/datatype/Summon2daBitmap.java | 2 +- src/org/infinity/datatype/UnknownDecimal.java | 2 +- .../infinity/datatype/UnsignHexNumber.java | 2 +- src/org/infinity/gui/BIFFEditor.java | 2 +- src/org/infinity/gui/BcsDropFrame.java | 2 +- src/org/infinity/gui/BookmarkEditor.java | 2 +- src/org/infinity/gui/ChildFrame.java | 2 +- src/org/infinity/gui/ChooseBIFFrame.java | 2 +- src/org/infinity/gui/DebugConsole.java | 2 +- src/org/infinity/gui/FontChooser.java | 4 +- src/org/infinity/gui/InfinityAmp.java | 2 +- src/org/infinity/gui/InfinityTextArea.java | 2 +- src/org/infinity/gui/LinkButton.java | 2 +- src/org/infinity/gui/OpenFileFrame.java | 2 +- src/org/infinity/gui/OpenResourceDialog.java | 2 +- src/org/infinity/gui/PreferencesDialog.java | 16 +- src/org/infinity/gui/QuickSearch.java | 2 +- src/org/infinity/gui/ResourceTree.java | 2 +- src/org/infinity/gui/ScriptTextArea.java | 2 +- src/org/infinity/gui/SortableTable.java | 2 +- src/org/infinity/gui/StringEditor.java | 2 +- src/org/infinity/gui/StructViewer.java | 2 +- src/org/infinity/gui/TextListPanel.java | 2 +- src/org/infinity/gui/UrlBrowser.java | 2 +- src/org/infinity/gui/ViewerUtil.java | 9 +- .../infinity/gui/converter/BamFilterBase.java | 2 +- .../gui/converter/BamFilterFactory.java | 2 +- .../gui/converter/BamFilterOutputDefault.java | 2 +- .../gui/converter/BamFilterOutputImage.java | 2 +- .../converter/BamFilterOutputSplitted.java | 2 +- .../gui/converter/BamOptionsDialog.java | 2 +- .../infinity/gui/converter/ConvertToBam.java | 2 +- .../infinity/gui/converter/ConvertToBmp.java | 2 +- .../infinity/gui/converter/ConvertToMos.java | 2 +- .../infinity/gui/converter/ConvertToPvrz.java | 2 +- .../infinity/gui/converter/ConvertToTis.java | 2 +- .../gui/hexview/ResourceDataProvider.java | 2 +- .../infinity/gui/hexview/StructHexViewer.java | 2 +- .../gui/hexview/StructuredDataProvider.java | 2 +- src/org/infinity/gui/menu/FileMenu.java | 2 +- src/org/infinity/gui/menu/GameMenu.java | 2 +- src/org/infinity/gui/menu/HelpMenu.java | 2 +- src/org/infinity/gui/menu/LogLevel.java | 41 ++ .../infinity/gui/menu/OptionsMenuItem.java | 2 +- src/org/infinity/icon/Icons.java | 2 +- src/org/infinity/resource/AbstractStruct.java | 2 +- src/org/infinity/resource/Profile.java | 2 +- .../infinity/resource/ResourceFactory.java | 2 +- .../infinity/resource/StructureFactory.java | 2 +- .../infinity/resource/are/AreResource.java | 8 +- .../resource/are/viewer/AreaViewer.java | 2 +- .../resource/are/viewer/LayerActor.java | 2 +- .../resource/are/viewer/LayerAutomap.java | 2 +- .../resource/are/viewer/LayerDoor.java | 2 +- .../resource/are/viewer/LayerManager.java | 2 +- .../are/viewer/LayerObjectAmbient.java | 2 +- .../are/viewer/LayerObjectAnimation.java | 2 +- .../are/viewer/LayerObjectAreActor.java | 2 +- .../are/viewer/LayerObjectAutomap.java | 2 +- .../are/viewer/LayerObjectAutomapPST.java | 2 +- .../are/viewer/LayerObjectContainer.java | 2 +- .../resource/are/viewer/LayerObjectDoor.java | 8 +- .../are/viewer/LayerObjectDoorCells.java | 9 +- .../are/viewer/LayerObjectDoorPoly.java | 2 +- .../are/viewer/LayerObjectEntrance.java | 2 +- .../are/viewer/LayerObjectGlobalActor.java | 2 +- .../are/viewer/LayerObjectIniActor.java | 2 +- .../are/viewer/LayerObjectProTrap.java | 2 +- .../are/viewer/LayerObjectRegion.java | 2 +- .../are/viewer/LayerObjectSpawnPoint.java | 2 +- .../are/viewer/LayerObjectTransition.java | 2 +- .../are/viewer/LayerObjectWallPoly.java | 2 +- .../resource/are/viewer/LayerTransition.java | 2 +- .../resource/are/viewer/Settings.java | 2 +- .../resource/are/viewer/TilesetRenderer.java | 2 +- .../infinity/resource/bcs/BafResource.java | 2 +- src/org/infinity/resource/bcs/BcsAction.java | 2 +- src/org/infinity/resource/bcs/BcsObject.java | 2 +- .../infinity/resource/bcs/BcsResource.java | 2 +- src/org/infinity/resource/bcs/BcsTrigger.java | 2 +- src/org/infinity/resource/bcs/Compiler.java | 2 +- src/org/infinity/resource/bcs/Decompiler.java | 2 +- .../infinity/resource/cre/CreResource.java | 2 +- .../resource/cre/ViewerAnimation.java | 2 +- .../cre/browser/ColorSelectionModel.java | 2 +- .../resource/cre/browser/CreUtils.java | 2 +- .../cre/browser/CreatureAnimationModel.java | 2 +- .../resource/cre/browser/CreatureBrowser.java | 2 +- .../cre/browser/CreatureControlModel.java | 2 +- .../cre/browser/CreatureControlPanel.java | 2 +- .../cre/browser/CreatureSelectionModel.java | 2 +- .../resource/cre/browser/MediaPanel.java | 2 +- .../resource/cre/browser/bg/Backgrounds.java | 2 +- .../cre/decoder/PlaceholderDecoder.java | 2 +- .../resource/cre/decoder/SpriteDecoder.java | 2 +- .../cre/decoder/tables/InfinityTables.java | 2 +- .../cre/decoder/tables/SpriteTables.java | 8 +- .../cre/decoder/util/AnimationInfo.java | 9 +- .../cre/decoder/util/CreatureInfo.java | 2 +- .../resource/cre/decoder/util/EffectInfo.java | 2 +- .../resource/cre/decoder/util/ItemInfo.java | 2 +- .../cre/decoder/util/SpriteUtils.java | 2 +- .../infinity/resource/dlg/AbstractCode.java | 2 +- .../infinity/resource/dlg/DlgResource.java | 2 +- .../infinity/resource/dlg/DlgTreeModel.java | 2 +- src/org/infinity/resource/dlg/TreeWorker.java | 2 +- src/org/infinity/resource/dlg/Viewer.java | 2 +- .../infinity/resource/effects/BaseOpcode.java | 2 +- .../infinity/resource/gam/GamResource.java | 2 +- .../resource/graphics/BamDecoder.java | 2 +- .../resource/graphics/BamResource.java | 2 +- .../resource/graphics/BamV1Decoder.java | 2 +- .../resource/graphics/BamV2Decoder.java | 2 +- .../resource/graphics/ColorConvert.java | 2 +- .../resource/graphics/GifSequenceReader.java | 2 +- .../resource/graphics/MosDecoder.java | 2 +- .../resource/graphics/MosResource.java | 2 +- .../resource/graphics/MosV1Decoder.java | 2 +- .../resource/graphics/MosV2Decoder.java | 2 +- .../resource/graphics/PltResource.java | 2 +- .../resource/graphics/PseudoBamDecoder.java | 2 +- .../resource/graphics/PvrDecoder.java | 2 +- .../resource/graphics/PvrzResource.java | 2 +- .../resource/graphics/TisConvert.java | 2 +- .../resource/graphics/TisDecoder.java | 2 +- .../resource/graphics/TisResource.java | 2 +- .../resource/graphics/TisV1Decoder.java | 2 +- .../resource/graphics/TisV2Decoder.java | 2 +- .../infinity/resource/itm/ItmResource.java | 2 +- .../infinity/resource/itm/ViewerAbility.java | 5 +- src/org/infinity/resource/key/BIFFEntry.java | 2 +- src/org/infinity/resource/key/BIFFReader.java | 2 +- .../resource/key/BIFFResourceEntry.java | 2 +- src/org/infinity/resource/key/BIFFWriter.java | 2 +- .../resource/key/FileResourceEntry.java | 2 +- src/org/infinity/resource/key/Keyfile.java | 2 +- .../infinity/resource/key/ResourceEntry.java | 2 +- .../resource/key/ResourceTreeModel.java | 2 +- .../infinity/resource/mus/MusResource.java | 2 +- src/org/infinity/resource/mus/Viewer.java | 2 +- .../infinity/resource/other/EffResource.java | 2 +- .../infinity/resource/other/TtfResource.java | 2 +- .../resource/other/UnknownResource.java | 2 +- .../infinity/resource/other/VvcResource.java | 2 +- .../infinity/resource/pro/ProResource.java | 2 +- src/org/infinity/resource/sav/IOHandler.java | 2 +- .../infinity/resource/sav/SavResource.java | 2 +- .../resource/sav/SavResourceEntry.java | 2 +- .../infinity/resource/sound/AudioFactory.java | 2 +- .../infinity/resource/sound/AudioPlayer.java | 4 +- .../infinity/resource/sound/OggBuffer.java | 2 +- .../resource/sound/SoundResource.java | 2 +- .../infinity/resource/spl/SplResource.java | 2 +- src/org/infinity/resource/spl/Viewer.java | 2 +- .../infinity/resource/sto/StoResource.java | 2 +- .../resource/text/PlainTextResource.java | 8 +- .../resource/text/modes/BCSFoldParser.java | 2 +- .../resource/text/modes/BCSTokenMaker.java | 2 +- .../resource/text/modes/GLSLTokenMaker.java | 3 +- .../resource/text/modes/INITokenMaker.java | 2 +- .../resource/text/modes/MenuTokenMaker.java | 3 +- .../resource/text/modes/TLKTokenMaker.java | 2 +- .../text/modes/WeiDULogTokenMaker.java | 2 +- src/org/infinity/resource/to/TohResource.java | 2 +- src/org/infinity/resource/to/TotResource.java | 2 +- src/org/infinity/resource/vef/VefType.java | 2 +- .../infinity/resource/video/AudioQueue.java | 4 +- .../infinity/resource/video/MveDecoder.java | 2 +- .../infinity/resource/video/MvePlayer.java | 2 +- .../infinity/resource/video/MveResource.java | 2 +- .../resource/video/MveVideoDecoder.java | 2 +- .../infinity/resource/video/WbmResource.java | 2 +- src/org/infinity/resource/wmp/ViewerMap.java | 2 +- src/org/infinity/search/AbstractSearcher.java | 2 +- .../search/DialogItemRefSearcher.java | 2 +- src/org/infinity/search/DialogSearcher.java | 2 +- .../infinity/search/ReferenceSearcher.java | 2 +- src/org/infinity/search/SearchFrame.java | 2 +- src/org/infinity/search/SearchMaster.java | 2 +- src/org/infinity/search/SearchOptions.java | 2 +- src/org/infinity/search/SearchResource.java | 4 +- .../search/SongReferenceSearcher.java | 2 +- .../search/StringReferenceSearcher.java | 2 +- .../infinity/search/TextResourceSearcher.java | 2 +- .../search/advanced/AdvancedSearch.java | 2 +- .../search/advanced/AdvancedSearchWorker.java | 2 +- .../infinity/search/advanced/FilterInput.java | 2 +- .../search/advanced/NumberFormatterEx.java | 2 +- .../infinity/search/advanced/XmlConfig.java | 2 +- src/org/infinity/updater/UpdateCheck.java | 2 +- src/org/infinity/updater/UpdateInfo.java | 2 +- src/org/infinity/updater/Updater.java | 2 +- src/org/infinity/updater/UpdaterSettings.java | 2 +- src/org/infinity/updater/Utils.java | 2 +- src/org/infinity/util/BOMStringReader.java | 2 - src/org/infinity/util/CharsetDetector.java | 1 - src/org/infinity/util/CreMapCache.java | 1 - src/org/infinity/util/FileDeletionHook.java | 1 - src/org/infinity/util/IdsMapCache.java | 1 - src/org/infinity/util/IniMap.java | 1 - src/org/infinity/util/IniMapCache.java | 1 - src/org/infinity/util/IniMapEntry.java | 1 - src/org/infinity/util/LauncherUtils.java | 2 - src/org/infinity/util/Logger.java | 606 ++++++++++++++++++ src/org/infinity/util/LuaParser.java | 1 - src/org/infinity/util/MassExporter.java | 1 - src/org/infinity/util/Misc.java | 1 - src/org/infinity/util/Platform.java | 2 - src/org/infinity/util/StringTable.java | 1 - src/org/infinity/util/StructClipboard.java | 1 - src/org/infinity/util/Table2da.java | 1 - src/org/infinity/util/Threading.java | 2 - src/org/infinity/util/io/DlcManager.java | 2 +- src/org/infinity/util/io/FileEx.java | 2 +- src/org/infinity/util/io/FileManager.java | 13 +- src/org/infinity/util/io/StreamUtils.java | 2 +- .../util/io/zip/DlcFileAttributeView.java | 4 +- src/org/infinity/util/io/zip/DlcPath.java | 4 +- src/org/infinity/util/io/zip/ZipCoder.java | 9 +- src/tinylog.properties | 2 +- 244 files changed, 949 insertions(+), 266 deletions(-) create mode 100644 src/org/infinity/gui/menu/LogLevel.java create mode 100644 src/org/infinity/util/Logger.java diff --git a/src/org/infinity/AppOption.java b/src/org/infinity/AppOption.java index 22728e2f0..2cc118802 100644 --- a/src/org/infinity/AppOption.java +++ b/src/org/infinity/AppOption.java @@ -19,6 +19,7 @@ import java.util.stream.Collectors; import org.infinity.gui.menu.BrowserMenuBar; +import org.infinity.gui.menu.LogLevel; import org.infinity.gui.menu.OptionsMenuItem; import org.infinity.gui.menu.OverrideMode; import org.infinity.gui.menu.ResRefMode; @@ -284,6 +285,9 @@ public class AppOption { "Show State/Response Numbers", true); // Category: Visual Options + /** Menu Options > Visual Options: AppLogLevel (Integer, Default: Level.INFO) */ + public static final AppOption APP_LOG_LEVEL = new AppOption(NearInfinity.APP_LOG_LEVEL, "Application Log Level", + LogLevel.INFO.ordinal()); /** Menu Options > Visual Options: ShowResRef (Integer, Default: ResRefMode.RefName) */ public static final AppOption SHOW_RES_REF = new AppOption(OptionsMenuItem.OPTION_SHOWRESREF, "Show ResourceRef As", ResRefMode.RefName.ordinal()); diff --git a/src/org/infinity/NearInfinity.java b/src/org/infinity/NearInfinity.java index d2138a773..dd5fd628f 100644 --- a/src/org/infinity/NearInfinity.java +++ b/src/org/infinity/NearInfinity.java @@ -124,6 +124,7 @@ import org.infinity.util.IdsMapCache; import org.infinity.util.IniMapCache; import org.infinity.util.LauncherUtils; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.Operation; import org.infinity.util.Platform; @@ -133,7 +134,6 @@ import org.infinity.util.io.FileEx; import org.infinity.util.io.FileManager; import org.infinity.util.tuples.Couple; -import org.tinylog.Logger; public final class NearInfinity extends JFrame implements ActionListener, ViewableContainer { // the current Near Infinity version @@ -158,6 +158,7 @@ public final class NearInfinity extends JFrame implements ActionListener, Viewab public static final String OPTION_GLOBAL_FONT_SIZE = "GlobalFontSize"; public static final String APP_UI_SCALE_ENABLED = "AppUiScaleEnabled"; public static final String APP_UI_SCALE_FACTOR = "AppUiScaleFactor"; + public static final String APP_LOG_LEVEL = "AppLogLevel"; private static final String STATUSBAR_TEXT_FMT = "Welcome to Near Infinity! - %s @ %s - %d files available"; diff --git a/src/org/infinity/check/BCSIDSChecker.java b/src/org/infinity/check/BCSIDSChecker.java index 29282d38d..14037cca1 100644 --- a/src/org/infinity/check/BCSIDSChecker.java +++ b/src/org/infinity/check/BCSIDSChecker.java @@ -40,8 +40,8 @@ import org.infinity.resource.bcs.ScriptType; import org.infinity.resource.key.ResourceEntry; import org.infinity.search.AbstractSearcher; +import org.infinity.util.Logger; import org.infinity.util.Misc; -import org.tinylog.Logger; /** Performs checking {@link BcsResource BCS} & {@code BS} resources. */ public final class BCSIDSChecker extends AbstractSearcher implements Runnable, ActionListener, ListSelectionListener { diff --git a/src/org/infinity/check/CreInvChecker.java b/src/org/infinity/check/CreInvChecker.java index d2095c0bf..581698f3b 100644 --- a/src/org/infinity/check/CreInvChecker.java +++ b/src/org/infinity/check/CreInvChecker.java @@ -43,8 +43,8 @@ import org.infinity.resource.cre.Item; import org.infinity.resource.key.ResourceEntry; import org.infinity.search.AbstractSearcher; +import org.infinity.util.Logger; import org.infinity.util.Misc; -import org.tinylog.Logger; /** Performs checking {@link CreResource CRE} & {@code CHR} resources. */ public final class CreInvChecker extends AbstractSearcher implements Runnable, ActionListener, ListSelectionListener { diff --git a/src/org/infinity/check/DialogChecker.java b/src/org/infinity/check/DialogChecker.java index 3f0f68671..93be5ab4c 100644 --- a/src/org/infinity/check/DialogChecker.java +++ b/src/org/infinity/check/DialogChecker.java @@ -46,8 +46,8 @@ import org.infinity.resource.dlg.DlgResource; import org.infinity.resource.key.ResourceEntry; import org.infinity.search.AbstractSearcher; +import org.infinity.util.Logger; import org.infinity.util.Misc; -import org.tinylog.Logger; /** Performs checking {@link DlgResource DLG} resources. */ public final class DialogChecker extends AbstractSearcher diff --git a/src/org/infinity/check/ResourceUseChecker.java b/src/org/infinity/check/ResourceUseChecker.java index 04be55255..95346d04a 100644 --- a/src/org/infinity/check/ResourceUseChecker.java +++ b/src/org/infinity/check/ResourceUseChecker.java @@ -56,9 +56,9 @@ import org.infinity.resource.dlg.Transition; import org.infinity.resource.key.ResourceEntry; import org.infinity.resource.text.PlainTextResource; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.StringTable; -import org.tinylog.Logger; public final class ResourceUseChecker extends AbstractChecker implements Runnable, ListSelectionListener, ActionListener { diff --git a/src/org/infinity/check/ScriptChecker.java b/src/org/infinity/check/ScriptChecker.java index 9aa644620..7f43d1256 100644 --- a/src/org/infinity/check/ScriptChecker.java +++ b/src/org/infinity/check/ScriptChecker.java @@ -42,8 +42,8 @@ import org.infinity.resource.bcs.ScriptMessage; import org.infinity.resource.key.ResourceEntry; import org.infinity.search.AbstractSearcher; +import org.infinity.util.Logger; import org.infinity.util.Misc; -import org.tinylog.Logger; /** Performs checking {@link BcsResource BCS} & {@code BS} resources. */ public final class ScriptChecker extends AbstractSearcher diff --git a/src/org/infinity/check/StringUseChecker.java b/src/org/infinity/check/StringUseChecker.java index de629df01..95d8aed57 100644 --- a/src/org/infinity/check/StringUseChecker.java +++ b/src/org/infinity/check/StringUseChecker.java @@ -55,13 +55,13 @@ import org.infinity.search.SearchClient; import org.infinity.search.SearchMaster; import org.infinity.search.StringReferenceSearcher; +import org.infinity.util.Logger; import org.infinity.util.LuaEntry; import org.infinity.util.LuaParser; import org.infinity.util.Misc; import org.infinity.util.StringTable; import org.infinity.util.Table2da; import org.infinity.util.Table2daCache; -import org.tinylog.Logger; public final class StringUseChecker extends AbstractSearcher implements Runnable, ListSelectionListener, SearchClient, ActionListener { diff --git a/src/org/infinity/check/StringValidationChecker.java b/src/org/infinity/check/StringValidationChecker.java index 73fbd735d..1c51c4f31 100644 --- a/src/org/infinity/check/StringValidationChecker.java +++ b/src/org/infinity/check/StringValidationChecker.java @@ -52,10 +52,10 @@ import org.infinity.resource.key.FileResourceEntry; import org.infinity.resource.key.ResourceEntry; import org.infinity.search.AbstractSearcher; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.StringTable; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public class StringValidationChecker extends AbstractSearcher implements Runnable, ActionListener, ListSelectionListener { diff --git a/src/org/infinity/check/StrrefIndexChecker.java b/src/org/infinity/check/StrrefIndexChecker.java index e758da22c..390ebf19f 100644 --- a/src/org/infinity/check/StrrefIndexChecker.java +++ b/src/org/infinity/check/StrrefIndexChecker.java @@ -48,11 +48,11 @@ import org.infinity.resource.key.ResourceEntry; import org.infinity.resource.text.PlainTextResource; import org.infinity.search.StringReferenceSearcher; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.StringTable; import org.infinity.util.Table2da; import org.infinity.util.Table2daCache; -import org.tinylog.Logger; public class StrrefIndexChecker extends AbstractChecker implements ListSelectionListener { private final ChildFrame resultFrame = new ChildFrame("Illegal strrefs found", true); diff --git a/src/org/infinity/check/StructChecker.java b/src/org/infinity/check/StructChecker.java index 5260c6e23..9b50d5259 100644 --- a/src/org/infinity/check/StructChecker.java +++ b/src/org/infinity/check/StructChecker.java @@ -54,9 +54,9 @@ import org.infinity.resource.sto.ItemSale11; import org.infinity.resource.wed.Overlay; import org.infinity.resource.wed.Tilemap; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.StringTable; -import org.tinylog.Logger; public final class StructChecker extends AbstractChecker implements ListSelectionListener { private static final String[] FILETYPES = { "ARE", "CHR", "CHU", "CRE", "DLG", "EFF", "GAM", "ITM", "PRO", "SPL", diff --git a/src/org/infinity/datatype/Bestiary.java b/src/org/infinity/datatype/Bestiary.java index 6862a1cbe..b5678de8f 100644 --- a/src/org/infinity/datatype/Bestiary.java +++ b/src/org/infinity/datatype/Bestiary.java @@ -65,9 +65,9 @@ import org.infinity.util.IniMapCache; import org.infinity.util.IniMapEntry; import org.infinity.util.IniMapSection; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.StringTable; -import org.tinylog.Logger; /** * Datatype for {@link GamResource#GAM_BESTIARY Bestiary} field of the {@link GamResource GAM} resource. diff --git a/src/org/infinity/datatype/ColorPicker.java b/src/org/infinity/datatype/ColorPicker.java index 7ae6e57ab..75a474029 100644 --- a/src/org/infinity/datatype/ColorPicker.java +++ b/src/org/infinity/datatype/ColorPicker.java @@ -37,8 +37,8 @@ import org.infinity.icon.Icons; import org.infinity.resource.AbstractStruct; import org.infinity.resource.graphics.ColorConvert; +import org.infinity.util.Logger; import org.infinity.util.Misc; -import org.tinylog.Logger; /** * Implements a RGB color picker control. diff --git a/src/org/infinity/datatype/ColorValue.java b/src/org/infinity/datatype/ColorValue.java index a488cb69b..bebf7ab72 100644 --- a/src/org/infinity/datatype/ColorValue.java +++ b/src/org/infinity/datatype/ColorValue.java @@ -58,10 +58,10 @@ import org.infinity.util.IdsMap; import org.infinity.util.IdsMapCache; import org.infinity.util.IdsMapEntry; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.Table2da; import org.infinity.util.Table2daCache; -import org.tinylog.Logger; /** * Field that represents indexed color or color range. diff --git a/src/org/infinity/datatype/Datatype.java b/src/org/infinity/datatype/Datatype.java index 20ca9d25a..aa357fb52 100644 --- a/src/org/infinity/datatype/Datatype.java +++ b/src/org/infinity/datatype/Datatype.java @@ -17,9 +17,9 @@ import org.infinity.resource.AbstractStruct; import org.infinity.resource.StructEntry; +import org.infinity.util.Logger; import org.infinity.util.io.ByteBufferOutputStream; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * Base class for all types of fields. Supplies base properties for fields: its name (not stored in the file), offset in diff --git a/src/org/infinity/datatype/DecNumber.java b/src/org/infinity/datatype/DecNumber.java index d31936d81..5fa670c7c 100644 --- a/src/org/infinity/datatype/DecNumber.java +++ b/src/org/infinity/datatype/DecNumber.java @@ -12,7 +12,7 @@ import java.util.Objects; import org.infinity.resource.AbstractStruct; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Field that represents numerical value which is usually edited in a decimal mode. diff --git a/src/org/infinity/datatype/EffectType.java b/src/org/infinity/datatype/EffectType.java index 58f3ec652..6dc7962a3 100644 --- a/src/org/infinity/datatype/EffectType.java +++ b/src/org/infinity/datatype/EffectType.java @@ -12,7 +12,7 @@ import org.infinity.resource.AbstractStruct; import org.infinity.resource.StructEntry; import org.infinity.resource.effects.BaseOpcode; -import org.tinylog.Logger; +import org.infinity.util.Logger; public final class EffectType extends Bitmap implements UpdateListener { // EffectType-specific field labels diff --git a/src/org/infinity/datatype/FloatNumber.java b/src/org/infinity/datatype/FloatNumber.java index ad9d674bb..c39d2b02a 100644 --- a/src/org/infinity/datatype/FloatNumber.java +++ b/src/org/infinity/datatype/FloatNumber.java @@ -11,8 +11,8 @@ import java.util.Objects; import org.infinity.resource.AbstractStruct; +import org.infinity.util.Logger; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * Field that represents numerical value which is usually edited in a floating point mode. diff --git a/src/org/infinity/datatype/HexNumber.java b/src/org/infinity/datatype/HexNumber.java index 14097c588..3fe9e959c 100644 --- a/src/org/infinity/datatype/HexNumber.java +++ b/src/org/infinity/datatype/HexNumber.java @@ -6,7 +6,7 @@ import java.nio.ByteBuffer; -import org.tinylog.Logger; +import org.infinity.util.Logger; public class HexNumber extends DecNumber { public HexNumber(ByteBuffer buffer, int offset, int length, String desc) { diff --git a/src/org/infinity/datatype/ItemTypeBitmap.java b/src/org/infinity/datatype/ItemTypeBitmap.java index 3f631d158..909050206 100644 --- a/src/org/infinity/datatype/ItemTypeBitmap.java +++ b/src/org/infinity/datatype/ItemTypeBitmap.java @@ -13,10 +13,10 @@ import org.infinity.util.IdsMap; import org.infinity.util.IdsMapCache; import org.infinity.util.IdsMapEntry; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.Table2da; import org.infinity.util.Table2daCache; -import org.tinylog.Logger; /** * Specialized {@link HashBitmap} that uses a mix of hardcoded entries and custom entries from ITEMTYPE.2DA diff --git a/src/org/infinity/datatype/MultiNumber.java b/src/org/infinity/datatype/MultiNumber.java index 9ac1460ed..f58f44876 100644 --- a/src/org/infinity/datatype/MultiNumber.java +++ b/src/org/infinity/datatype/MultiNumber.java @@ -31,8 +31,8 @@ import org.infinity.gui.ViewerUtil; import org.infinity.gui.menu.BrowserMenuBar; import org.infinity.resource.AbstractStruct; +import org.infinity.util.Logger; import org.infinity.util.Misc; -import org.tinylog.Logger; /** * A Number object consisting of multiple values of a given number of bits. diff --git a/src/org/infinity/datatype/ResourceRef.java b/src/org/infinity/datatype/ResourceRef.java index c42262d05..970ebc53d 100644 --- a/src/org/infinity/datatype/ResourceRef.java +++ b/src/org/infinity/datatype/ResourceRef.java @@ -44,9 +44,9 @@ import org.infinity.resource.ResourceFactory; import org.infinity.resource.key.ResourceEntry; import org.infinity.resource.sound.SoundResource; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * Represents reference to another resource in game. This resource can be sound, item, dialog, creature, image. diff --git a/src/org/infinity/datatype/SpellProtType.java b/src/org/infinity/datatype/SpellProtType.java index 56fd030b7..730e17623 100644 --- a/src/org/infinity/datatype/SpellProtType.java +++ b/src/org/infinity/datatype/SpellProtType.java @@ -18,9 +18,9 @@ import org.infinity.util.IdsMap; import org.infinity.util.IdsMapCache; import org.infinity.util.IdsMapEntry; +import org.infinity.util.Logger; import org.infinity.util.Table2da; import org.infinity.util.Table2daCache; -import org.tinylog.Logger; /** * Specialized Bitmap type for translating SPLPROT.2DA data into human-readable descriptions. diff --git a/src/org/infinity/datatype/StringRef.java b/src/org/infinity/datatype/StringRef.java index 9136c4db5..df32702e4 100644 --- a/src/org/infinity/datatype/StringRef.java +++ b/src/org/infinity/datatype/StringRef.java @@ -51,10 +51,10 @@ import org.infinity.resource.sav.SavResourceEntry; import org.infinity.resource.to.TohResource; import org.infinity.search.StringReferenceSearcher; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.StringTable; import org.infinity.util.io.FileManager; -import org.tinylog.Logger; /** * A struct field that represents reference to string in a talk table file (dialog.tlk or dialogF.tlk). diff --git a/src/org/infinity/datatype/Summon2daBitmap.java b/src/org/infinity/datatype/Summon2daBitmap.java index 29dc93118..961986306 100644 --- a/src/org/infinity/datatype/Summon2daBitmap.java +++ b/src/org/infinity/datatype/Summon2daBitmap.java @@ -9,9 +9,9 @@ import java.util.TreeMap; import org.infinity.resource.ResourceFactory; +import org.infinity.util.Logger; import org.infinity.util.Table2da; import org.infinity.util.Table2daCache; -import org.tinylog.Logger; /** Specialized HashBitmap type for parsing {@code SMTABLES.2DA} from IWDEE. */ public class Summon2daBitmap extends HashBitmap { diff --git a/src/org/infinity/datatype/UnknownDecimal.java b/src/org/infinity/datatype/UnknownDecimal.java index 300eeb053..20ea48301 100644 --- a/src/org/infinity/datatype/UnknownDecimal.java +++ b/src/org/infinity/datatype/UnknownDecimal.java @@ -8,7 +8,7 @@ import java.nio.ByteBuffer; import org.infinity.resource.AbstractStruct; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Field that represents binary data in decimal format in their editor. diff --git a/src/org/infinity/datatype/UnsignHexNumber.java b/src/org/infinity/datatype/UnsignHexNumber.java index 0b99c36ca..505ea9a72 100644 --- a/src/org/infinity/datatype/UnsignHexNumber.java +++ b/src/org/infinity/datatype/UnsignHexNumber.java @@ -6,7 +6,7 @@ import java.nio.ByteBuffer; -import org.tinylog.Logger; +import org.infinity.util.Logger; public class UnsignHexNumber extends UnsignDecNumber { public UnsignHexNumber(ByteBuffer buffer, int offset, int length, String desc) { diff --git a/src/org/infinity/gui/BIFFEditor.java b/src/org/infinity/gui/BIFFEditor.java index 4eb909796..a78a85fb7 100644 --- a/src/org/infinity/gui/BIFFEditor.java +++ b/src/org/infinity/gui/BIFFEditor.java @@ -42,10 +42,10 @@ import org.infinity.resource.key.BIFFWriter; import org.infinity.resource.key.FileResourceEntry; import org.infinity.resource.key.ResourceEntry; +import org.infinity.util.Logger; import org.infinity.util.io.FileEx; import org.infinity.util.io.FileManager; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public final class BIFFEditor implements ActionListener, ListSelectionListener, Runnable { private static boolean firstRun = true; diff --git a/src/org/infinity/gui/BcsDropFrame.java b/src/org/infinity/gui/BcsDropFrame.java index 86556d2d0..aba81824f 100644 --- a/src/org/infinity/gui/BcsDropFrame.java +++ b/src/org/infinity/gui/BcsDropFrame.java @@ -60,10 +60,10 @@ import org.infinity.resource.bcs.ScriptMessage; import org.infinity.resource.bcs.ScriptType; import org.infinity.resource.key.FileResourceEntry; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.io.FileEx; import org.infinity.util.io.FileManager; -import org.tinylog.Logger; public class BcsDropFrame extends ChildFrame implements ActionListener, ListSelectionListener { private final JButton bOpen = new JButton("Open selected", Icons.ICON_OPEN_16.getIcon()); diff --git a/src/org/infinity/gui/BookmarkEditor.java b/src/org/infinity/gui/BookmarkEditor.java index f6ca8c2f8..185945e28 100644 --- a/src/org/infinity/gui/BookmarkEditor.java +++ b/src/org/infinity/gui/BookmarkEditor.java @@ -52,10 +52,10 @@ import org.infinity.NearInfinity; import org.infinity.gui.menu.Bookmark; import org.infinity.resource.Profile; +import org.infinity.util.Logger; import org.infinity.util.Platform; import org.infinity.util.SimpleListModel; import org.infinity.util.io.FileManager; -import org.tinylog.Logger; /** * Edit or remove bookmarked games. diff --git a/src/org/infinity/gui/ChildFrame.java b/src/org/infinity/gui/ChildFrame.java index a797fc3cb..e98c0214b 100644 --- a/src/org/infinity/gui/ChildFrame.java +++ b/src/org/infinity/gui/ChildFrame.java @@ -34,7 +34,7 @@ import org.infinity.resource.Viewable; import org.infinity.resource.ViewableContainer; import org.infinity.resource.graphics.BamResource; -import org.tinylog.Logger; +import org.infinity.util.Logger; public class ChildFrame extends JFrame { private static final List WINDOWS = new ArrayList<>(); diff --git a/src/org/infinity/gui/ChooseBIFFrame.java b/src/org/infinity/gui/ChooseBIFFrame.java index c910fd675..cdba830c7 100644 --- a/src/org/infinity/gui/ChooseBIFFrame.java +++ b/src/org/infinity/gui/ChooseBIFFrame.java @@ -29,7 +29,7 @@ import org.infinity.resource.ResourceFactory; import org.infinity.resource.key.AbstractBIFFReader; import org.infinity.resource.key.BIFFEntry; -import org.tinylog.Logger; +import org.infinity.util.Logger; final class ChooseBIFFrame extends ChildFrame implements ActionListener { private final BIFFEditor editor; diff --git a/src/org/infinity/gui/DebugConsole.java b/src/org/infinity/gui/DebugConsole.java index adbff19bf..f72d9c87e 100644 --- a/src/org/infinity/gui/DebugConsole.java +++ b/src/org/infinity/gui/DebugConsole.java @@ -26,9 +26,9 @@ import org.infinity.gui.menu.BrowserMenuBar; import org.infinity.icon.Icons; import org.infinity.resource.Profile; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.io.FileEx; -import org.tinylog.Logger; public class DebugConsole extends ChildFrame implements ActionListener { private final JButton bClearConsole = new JButton("Clear", Icons.ICON_NEW_16.getIcon()); diff --git a/src/org/infinity/gui/FontChooser.java b/src/org/infinity/gui/FontChooser.java index ee258b347..7feea6b9e 100644 --- a/src/org/infinity/gui/FontChooser.java +++ b/src/org/infinity/gui/FontChooser.java @@ -48,10 +48,8 @@ import javax.swing.text.JTextComponent; import javax.swing.text.Position; +import org.infinity.util.Logger; import org.infinity.util.Misc; -import org.tinylog.Logger; - -//import org.infinity.util.Misc; /** * The {@code FontChooser} class is a swing component for font selection. This class has {@code FileChooser} like APIs. diff --git a/src/org/infinity/gui/InfinityAmp.java b/src/org/infinity/gui/InfinityAmp.java index 29bb74a10..0ca2de71d 100644 --- a/src/org/infinity/gui/InfinityAmp.java +++ b/src/org/infinity/gui/InfinityAmp.java @@ -37,10 +37,10 @@ import org.infinity.resource.mus.Entry; import org.infinity.resource.sound.AudioBuffer; import org.infinity.resource.sound.AudioPlayer; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.SimpleListModel; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public final class InfinityAmp extends ChildFrame implements ActionListener, ListSelectionListener, Runnable, Closeable { diff --git a/src/org/infinity/gui/InfinityTextArea.java b/src/org/infinity/gui/InfinityTextArea.java index 80c27bbd4..cad8d7697 100644 --- a/src/org/infinity/gui/InfinityTextArea.java +++ b/src/org/infinity/gui/InfinityTextArea.java @@ -43,8 +43,8 @@ import org.infinity.resource.text.modes.MenuTokenMaker; import org.infinity.resource.text.modes.TLKTokenMaker; import org.infinity.resource.text.modes.WeiDULogTokenMaker; +import org.infinity.util.Logger; import org.infinity.util.Misc; -import org.tinylog.Logger; /** * Extends {@link RSyntaxTextArea} by NearInfinity-specific features. diff --git a/src/org/infinity/gui/LinkButton.java b/src/org/infinity/gui/LinkButton.java index a6028c34e..67e27d055 100644 --- a/src/org/infinity/gui/LinkButton.java +++ b/src/org/infinity/gui/LinkButton.java @@ -22,7 +22,7 @@ import org.infinity.resource.ResourceFactory; import org.infinity.resource.key.ResourceEntry; import org.infinity.updater.Utils; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * A JLabel-based control which supports either internal game resources or external URLs. diff --git a/src/org/infinity/gui/OpenFileFrame.java b/src/org/infinity/gui/OpenFileFrame.java index f3505b699..f03396511 100644 --- a/src/org/infinity/gui/OpenFileFrame.java +++ b/src/org/infinity/gui/OpenFileFrame.java @@ -46,9 +46,9 @@ import org.infinity.resource.ResourceFactory; import org.infinity.resource.key.FileResourceEntry; import org.infinity.resource.key.ResourceEntry; +import org.infinity.util.Logger; import org.infinity.util.io.FileEx; import org.infinity.util.io.FileManager; -import org.tinylog.Logger; public final class OpenFileFrame extends ChildFrame implements ActionListener { private static final JFileChooser FC = new JFileChooser("."); diff --git a/src/org/infinity/gui/OpenResourceDialog.java b/src/org/infinity/gui/OpenResourceDialog.java index c3f19a9a1..d377ab36b 100644 --- a/src/org/infinity/gui/OpenResourceDialog.java +++ b/src/org/infinity/gui/OpenResourceDialog.java @@ -48,8 +48,8 @@ import org.infinity.resource.ResourceFactory; import org.infinity.resource.key.ResourceEntry; import org.infinity.util.DataString; +import org.infinity.util.Logger; import org.infinity.util.SimpleListModel; -import org.tinylog.Logger; /** * Provides a modal dialog for selecting a single or multiple game resources of one or more given resource types. diff --git a/src/org/infinity/gui/PreferencesDialog.java b/src/org/infinity/gui/PreferencesDialog.java index 2b804f4f0..a831eb36a 100644 --- a/src/org/infinity/gui/PreferencesDialog.java +++ b/src/org/infinity/gui/PreferencesDialog.java @@ -74,6 +74,7 @@ import org.infinity.AppOption; import org.infinity.NearInfinity; import org.infinity.gui.menu.BrowserMenuBar; +import org.infinity.gui.menu.LogLevel; import org.infinity.gui.menu.OptionsMenuItem; import org.infinity.gui.menu.OptionsMenuItem.CharsetInfo; import org.infinity.gui.menu.OverrideMode; @@ -88,8 +89,8 @@ import org.infinity.gui.options.OptionGroupBox; import org.infinity.icon.Icons; import org.infinity.resource.Profile; +import org.infinity.util.Logger; import org.infinity.util.Misc; -import org.tinylog.Logger; /** * This modal dialog provides access to application-wide options and preferences @@ -473,6 +474,19 @@ public String toString() { ), OptionCategory.create(Category.VISUAL_OPTIONS, OptionGroup.createDefault( + OptionGroupBox.create(AppOption.APP_LOG_LEVEL.getName(), AppOption.APP_LOG_LEVEL.getLabel(), + "Specify the minimum severity level for log messages to be shown in the debug console." + + "

" + LogLevel.TRACE + ": (Not recommended) Log messages for all " + + "unexpected and many expected results which is only useful for developers.
" + + "

" + LogLevel.DEBUG + ": Log messages for diagnostic purposes which can be " + + "relevant for troubleshooting issues with the application.
" + + "

" + LogLevel.INFO + ": Log helpful information as well as warnings and " + + "errors.
" + + "

" + LogLevel.WARN + ": Log only warnings and errors. Choose this option to " + + "reduce the amount of messages without losing relevant information.
" + + "

" + LogLevel.ERROR + ": Log only error messages.
" + + "

" + LogLevel.OFF + ": This option disables logging completely.
", + LogLevel.INFO.ordinal(), LogLevel.values(), AppOption.APP_LOG_LEVEL), OptionGroupBox.create(AppOption.SHOW_RES_REF.getName(), AppOption.SHOW_RES_REF.getLabel(), "Choose how resources should be displayed in resource lists.", ResRefMode.RefName.ordinal(), ResRefMode.values(), AppOption.SHOW_RES_REF), diff --git a/src/org/infinity/gui/QuickSearch.java b/src/org/infinity/gui/QuickSearch.java index c2e9774bf..f37fa24d1 100644 --- a/src/org/infinity/gui/QuickSearch.java +++ b/src/org/infinity/gui/QuickSearch.java @@ -38,9 +38,9 @@ import org.infinity.resource.key.ResourceEntry; import org.infinity.resource.key.ResourceTreeFolder; import org.infinity.resource.key.ResourceTreeModel; +import org.infinity.util.Logger; import org.infinity.util.MapTree; import org.infinity.util.Misc; -import org.tinylog.Logger; /** * Implements a search panel for quickly finding specific resources. diff --git a/src/org/infinity/gui/ResourceTree.java b/src/org/infinity/gui/ResourceTree.java index 6026a2a41..43e97ca4b 100644 --- a/src/org/infinity/gui/ResourceTree.java +++ b/src/org/infinity/gui/ResourceTree.java @@ -68,11 +68,11 @@ import org.infinity.resource.key.ResourceTreeFolder; import org.infinity.resource.key.ResourceTreeModel; import org.infinity.util.IconCache; +import org.infinity.util.Logger; import org.infinity.util.Operation; import org.infinity.util.io.FileEx; import org.infinity.util.io.FileManager; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public final class ResourceTree extends JPanel implements TreeSelectionListener, ActionListener { private final JButton bnext = new JButton("Forward", Icons.ICON_FORWARD_16.getIcon()); diff --git a/src/org/infinity/gui/ScriptTextArea.java b/src/org/infinity/gui/ScriptTextArea.java index d9de423aa..980b8e8a9 100644 --- a/src/org/infinity/gui/ScriptTextArea.java +++ b/src/org/infinity/gui/ScriptTextArea.java @@ -43,8 +43,8 @@ import org.infinity.resource.text.modes.BCSTokenMaker; import org.infinity.util.CreMapCache; import org.infinity.util.IdsMapCache; +import org.infinity.util.Logger; import org.infinity.util.Misc; -import org.tinylog.Logger; /** * Extends {@link InfinityTextArea} by script-specific features. diff --git a/src/org/infinity/gui/SortableTable.java b/src/org/infinity/gui/SortableTable.java index 263c39e72..595d4c233 100644 --- a/src/org/infinity/gui/SortableTable.java +++ b/src/org/infinity/gui/SortableTable.java @@ -34,8 +34,8 @@ import org.infinity.icon.Icons; import org.infinity.resource.Profile; import org.infinity.util.ArrayUtil; +import org.infinity.util.Logger; import org.infinity.util.io.FileEx; -import org.tinylog.Logger; public final class SortableTable extends JTable implements MouseListener { private static final String WITH_DELIMITERS = "(?<=%1$s)(?!%1$s)|(? extends JPanel implements DocumentListener, ListSelectionListener, ActionListener, ChangeListener { diff --git a/src/org/infinity/gui/UrlBrowser.java b/src/org/infinity/gui/UrlBrowser.java index 00b068234..adeda9893 100644 --- a/src/org/infinity/gui/UrlBrowser.java +++ b/src/org/infinity/gui/UrlBrowser.java @@ -14,7 +14,7 @@ import org.infinity.NearInfinity; import org.infinity.util.LauncherUtils; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Browses for the provided URI on mouse clicks diff --git a/src/org/infinity/gui/ViewerUtil.java b/src/org/infinity/gui/ViewerUtil.java index 0129c3903..cc288f004 100644 --- a/src/org/infinity/gui/ViewerUtil.java +++ b/src/org/infinity/gui/ViewerUtil.java @@ -20,7 +20,12 @@ import java.awt.event.KeyEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Comparator; +import java.util.List; +import java.util.Locale; +import java.util.Objects; import java.util.function.Function; import javax.swing.BorderFactory; @@ -64,10 +69,10 @@ import org.infinity.resource.graphics.MosResource; import org.infinity.resource.key.ResourceEntry; import org.infinity.util.IconCache; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.SimpleListModel; import org.infinity.util.StringTable; -import org.tinylog.Logger; public final class ViewerUtil { /** diff --git a/src/org/infinity/gui/converter/BamFilterBase.java b/src/org/infinity/gui/converter/BamFilterBase.java index c0f2d417e..0488e7fb6 100644 --- a/src/org/infinity/gui/converter/BamFilterBase.java +++ b/src/org/infinity/gui/converter/BamFilterBase.java @@ -12,7 +12,7 @@ import javax.swing.event.ChangeListener; import org.infinity.resource.graphics.PseudoBamDecoder.PseudoBamFrameEntry; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * The base class for BAM converter effects filters. diff --git a/src/org/infinity/gui/converter/BamFilterFactory.java b/src/org/infinity/gui/converter/BamFilterFactory.java index 8d47fd66a..e7a9b693c 100644 --- a/src/org/infinity/gui/converter/BamFilterFactory.java +++ b/src/org/infinity/gui/converter/BamFilterFactory.java @@ -8,7 +8,7 @@ import java.util.Collection; import java.util.List; -import org.tinylog.Logger; +import org.infinity.util.Logger; public class BamFilterFactory { private static final List FILTER_INFO_LIST = new ArrayList<>(); diff --git a/src/org/infinity/gui/converter/BamFilterOutputDefault.java b/src/org/infinity/gui/converter/BamFilterOutputDefault.java index af455f20e..8934daa05 100644 --- a/src/org/infinity/gui/converter/BamFilterOutputDefault.java +++ b/src/org/infinity/gui/converter/BamFilterOutputDefault.java @@ -17,7 +17,7 @@ import org.infinity.resource.graphics.DxtEncoder; import org.infinity.resource.graphics.PseudoBamDecoder; import org.infinity.resource.graphics.PseudoBamDecoder.PseudoBamFrameEntry; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * The default BAM output filter. diff --git a/src/org/infinity/gui/converter/BamFilterOutputImage.java b/src/org/infinity/gui/converter/BamFilterOutputImage.java index b39a3babc..617a7fd29 100644 --- a/src/org/infinity/gui/converter/BamFilterOutputImage.java +++ b/src/org/infinity/gui/converter/BamFilterOutputImage.java @@ -31,8 +31,8 @@ import org.infinity.resource.graphics.BamDecoder; import org.infinity.resource.graphics.PseudoBamDecoder; import org.infinity.resource.graphics.PseudoBamDecoder.PseudoBamFrameEntry; +import org.infinity.util.Logger; import org.infinity.util.Misc; -import org.tinylog.Logger; /** * Output filter: Exports each frame as separate image. diff --git a/src/org/infinity/gui/converter/BamFilterOutputSplitted.java b/src/org/infinity/gui/converter/BamFilterOutputSplitted.java index 005955a0f..8dc21c9c9 100644 --- a/src/org/infinity/gui/converter/BamFilterOutputSplitted.java +++ b/src/org/infinity/gui/converter/BamFilterOutputSplitted.java @@ -33,9 +33,9 @@ import org.infinity.resource.graphics.DxtEncoder; import org.infinity.resource.graphics.PseudoBamDecoder; import org.infinity.resource.graphics.PseudoBamDecoder.PseudoBamFrameEntry; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.io.FileManager; -import org.tinylog.Logger; /** * Output filter: split BAM and output each part into a separate file. diff --git a/src/org/infinity/gui/converter/BamOptionsDialog.java b/src/org/infinity/gui/converter/BamOptionsDialog.java index 8562d40ac..ed5eccfc2 100644 --- a/src/org/infinity/gui/converter/BamOptionsDialog.java +++ b/src/org/infinity/gui/converter/BamOptionsDialog.java @@ -45,9 +45,9 @@ import org.infinity.gui.ViewerUtil; import org.infinity.resource.Profile; import org.infinity.resource.graphics.ColorConvert; +import org.infinity.util.Logger; import org.infinity.util.io.FileEx; import org.infinity.util.io.FileManager; -import org.tinylog.Logger; /** * An options dialog for the BAM converter. diff --git a/src/org/infinity/gui/converter/ConvertToBam.java b/src/org/infinity/gui/converter/ConvertToBam.java index 4179d15f6..f86a1ad6d 100644 --- a/src/org/infinity/gui/converter/ConvertToBam.java +++ b/src/org/infinity/gui/converter/ConvertToBam.java @@ -122,13 +122,13 @@ import org.infinity.util.IniMap; import org.infinity.util.IniMapEntry; import org.infinity.util.IniMapSection; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.SimpleListModel; import org.infinity.util.io.FileEx; import org.infinity.util.io.FileManager; import org.infinity.util.io.StreamUtils; import org.infinity.util.tuples.Couple; -import org.tinylog.Logger; public class ConvertToBam extends ChildFrame implements ActionListener, PropertyChangeListener, FocusListener, ChangeListener, ListSelectionListener, MouseListener, KeyListener { diff --git a/src/org/infinity/gui/converter/ConvertToBmp.java b/src/org/infinity/gui/converter/ConvertToBmp.java index eb3662330..da249156e 100644 --- a/src/org/infinity/gui/converter/ConvertToBmp.java +++ b/src/org/infinity/gui/converter/ConvertToBmp.java @@ -54,11 +54,11 @@ import org.infinity.icon.Icons; import org.infinity.resource.Profile; import org.infinity.resource.graphics.ColorConvert; +import org.infinity.util.Logger; import org.infinity.util.SimpleListModel; import org.infinity.util.io.FileEx; import org.infinity.util.io.FileManager; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public class ConvertToBmp extends ChildFrame implements ActionListener, FocusListener, PropertyChangeListener { private static Path currentPath = Profile.getGameRoot(); diff --git a/src/org/infinity/gui/converter/ConvertToMos.java b/src/org/infinity/gui/converter/ConvertToMos.java index 1548fc9ca..ddcf85ea5 100644 --- a/src/org/infinity/gui/converter/ConvertToMos.java +++ b/src/org/infinity/gui/converter/ConvertToMos.java @@ -60,10 +60,10 @@ import org.infinity.util.BinPack2D; import org.infinity.util.DynamicArray; import org.infinity.util.IntegerHashMap; +import org.infinity.util.Logger; import org.infinity.util.io.FileEx; import org.infinity.util.io.FileManager; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public class ConvertToMos extends ChildFrame implements ActionListener, PropertyChangeListener, ChangeListener, FocusListener { diff --git a/src/org/infinity/gui/converter/ConvertToPvrz.java b/src/org/infinity/gui/converter/ConvertToPvrz.java index f49c8cfac..48711f73d 100644 --- a/src/org/infinity/gui/converter/ConvertToPvrz.java +++ b/src/org/infinity/gui/converter/ConvertToPvrz.java @@ -56,11 +56,11 @@ import org.infinity.resource.graphics.Compressor; import org.infinity.resource.graphics.DxtEncoder; import org.infinity.util.DynamicArray; +import org.infinity.util.Logger; import org.infinity.util.SimpleListModel; import org.infinity.util.io.FileEx; import org.infinity.util.io.FileManager; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public class ConvertToPvrz extends ChildFrame implements ActionListener, PropertyChangeListener { private static String currentDir = Profile.getGameRoot().toString(); diff --git a/src/org/infinity/gui/converter/ConvertToTis.java b/src/org/infinity/gui/converter/ConvertToTis.java index 2e9168135..6d1d80401 100644 --- a/src/org/infinity/gui/converter/ConvertToTis.java +++ b/src/org/infinity/gui/converter/ConvertToTis.java @@ -61,10 +61,10 @@ import org.infinity.util.BinPack2D; import org.infinity.util.DynamicArray; import org.infinity.util.IntegerHashMap; +import org.infinity.util.Logger; import org.infinity.util.io.FileEx; import org.infinity.util.io.FileManager; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public class ConvertToTis extends ChildFrame implements ActionListener, PropertyChangeListener, ChangeListener, FocusListener, KeyListener { diff --git a/src/org/infinity/gui/hexview/ResourceDataProvider.java b/src/org/infinity/gui/hexview/ResourceDataProvider.java index 89881c4b5..9efa8a187 100644 --- a/src/org/infinity/gui/hexview/ResourceDataProvider.java +++ b/src/org/infinity/gui/hexview/ResourceDataProvider.java @@ -9,7 +9,7 @@ import java.util.HashMap; import org.infinity.resource.key.ResourceEntry; -import org.tinylog.Logger; +import org.infinity.util.Logger; import tv.porst.jhexview.DataChangedEvent; import tv.porst.jhexview.IDataChangedListener; diff --git a/src/org/infinity/gui/hexview/StructHexViewer.java b/src/org/infinity/gui/hexview/StructHexViewer.java index 6158a3dcf..141a78e74 100644 --- a/src/org/infinity/gui/hexview/StructHexViewer.java +++ b/src/org/infinity/gui/hexview/StructHexViewer.java @@ -73,11 +73,11 @@ import org.infinity.resource.dlg.AbstractCode; import org.infinity.resource.key.BIFFResourceEntry; import org.infinity.resource.key.ResourceEntry; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.io.FileEx; import org.infinity.util.io.FileManager; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; import tv.porst.jhexview.DataChangedEvent; import tv.porst.jhexview.HexViewEvent; diff --git a/src/org/infinity/gui/hexview/StructuredDataProvider.java b/src/org/infinity/gui/hexview/StructuredDataProvider.java index f15be9676..1cef843c3 100644 --- a/src/org/infinity/gui/hexview/StructuredDataProvider.java +++ b/src/org/infinity/gui/hexview/StructuredDataProvider.java @@ -14,8 +14,8 @@ import org.infinity.resource.AbstractStruct; import org.infinity.resource.StructEntry; +import org.infinity.util.Logger; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; import tv.porst.jhexview.DataChangedEvent; import tv.porst.jhexview.IDataChangedListener; diff --git a/src/org/infinity/gui/menu/FileMenu.java b/src/org/infinity/gui/menu/FileMenu.java index 1c530391c..fc7a6e1ee 100644 --- a/src/org/infinity/gui/menu/FileMenu.java +++ b/src/org/infinity/gui/menu/FileMenu.java @@ -26,7 +26,7 @@ import org.infinity.resource.key.BIFFResourceEntry; import org.infinity.resource.key.FileResourceEntry; import org.infinity.resource.key.ResourceEntry; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Handles File menu items for the {@link BrowserMenuBar}. diff --git a/src/org/infinity/gui/menu/GameMenu.java b/src/org/infinity/gui/menu/GameMenu.java index 48e24d549..545824299 100644 --- a/src/org/infinity/gui/menu/GameMenu.java +++ b/src/org/infinity/gui/menu/GameMenu.java @@ -30,11 +30,11 @@ import org.infinity.icon.Icons; import org.infinity.resource.Profile; import org.infinity.resource.ResourceFactory; +import org.infinity.util.Logger; import org.infinity.util.Platform; import org.infinity.util.io.FileEx; import org.infinity.util.io.FileManager; import org.infinity.util.tuples.Couple; -import org.tinylog.Logger; /** * Handles Game menu items for the {@link BrowserMenuBar}. diff --git a/src/org/infinity/gui/menu/HelpMenu.java b/src/org/infinity/gui/menu/HelpMenu.java index 4f3f8b0fe..083bf0063 100644 --- a/src/org/infinity/gui/menu/HelpMenu.java +++ b/src/org/infinity/gui/menu/HelpMenu.java @@ -43,9 +43,9 @@ import org.infinity.updater.Updater; import org.infinity.updater.UpdaterSettings; import org.infinity.util.DataString; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.tuples.Couple; -import org.tinylog.Logger; /** * Handles Help menu items for the {@link BrowserMenuBar}. diff --git a/src/org/infinity/gui/menu/LogLevel.java b/src/org/infinity/gui/menu/LogLevel.java new file mode 100644 index 000000000..6684ce0ca --- /dev/null +++ b/src/org/infinity/gui/menu/LogLevel.java @@ -0,0 +1,41 @@ +// Near Infinity - An Infinity Engine Browser and Editor +// Copyright (C) 2001 Jon Olav Hauglid +// See LICENSE.txt for license information + +package org.infinity.gui.menu; + +import org.tinylog.Level; + +/** Wrapper for the {@link Level} enum from the tinylog logging framework. */ +public enum LogLevel { + TRACE(Level.TRACE, "Trace (fine-grained)"), + DEBUG(Level.DEBUG, "Debug (diagnostic)"), + INFO(Level.INFO, "Information (recommended)"), + WARN(Level.WARN, "Warning"), + ERROR(Level.ERROR, "Error"), + OFF(Level.OFF, "Disabled (not recommended)"), + ; + + private final Level level; + private final String title; + + LogLevel(Level level, String title) { + this.level = level; + this.title = title; + } + + /** Log {@link Level} associated with this enum. */ + public Level getLevel() { + return level; + } + + /** Title of the log level option in the Preferences dialog. */ + public String getTitle() { + return title; + } + + @Override + public String toString() { + return getTitle(); + } +} diff --git a/src/org/infinity/gui/menu/OptionsMenuItem.java b/src/org/infinity/gui/menu/OptionsMenuItem.java index aa98579c4..01eb0ac4f 100644 --- a/src/org/infinity/gui/menu/OptionsMenuItem.java +++ b/src/org/infinity/gui/menu/OptionsMenuItem.java @@ -47,10 +47,10 @@ import org.infinity.resource.Profile; import org.infinity.resource.ResourceFactory; import org.infinity.util.CharsetDetector; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.StringTable; import org.infinity.util.tuples.Couple; -import org.tinylog.Logger; /** * Handles Option menu items for the {@link BrowserMenuBar}. diff --git a/src/org/infinity/icon/Icons.java b/src/org/infinity/icon/Icons.java index 760a6e845..311158077 100644 --- a/src/org/infinity/icon/Icons.java +++ b/src/org/infinity/icon/Icons.java @@ -11,7 +11,7 @@ import javax.imageio.ImageIO; import javax.swing.ImageIcon; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Provides {@code ImageIcon} instances of selected graphics files. diff --git a/src/org/infinity/resource/AbstractStruct.java b/src/org/infinity/resource/AbstractStruct.java index 4544c26e0..dee566504 100644 --- a/src/org/infinity/resource/AbstractStruct.java +++ b/src/org/infinity/resource/AbstractStruct.java @@ -42,9 +42,9 @@ import org.infinity.resource.key.ResourceEntry; import org.infinity.resource.spl.SplResource; import org.infinity.search.ReferenceSearcher; +import org.infinity.util.Logger; import org.infinity.util.io.ByteBufferOutputStream; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public abstract class AbstractStruct extends AbstractTableModel implements StructEntry, Viewable, Closeable, Referenceable, PropertyChangeListener { diff --git a/src/org/infinity/resource/Profile.java b/src/org/infinity/resource/Profile.java index 97e7833f2..20348e325 100644 --- a/src/org/infinity/resource/Profile.java +++ b/src/org/infinity/resource/Profile.java @@ -51,13 +51,13 @@ import org.infinity.resource.key.ResourceTreeModel; import org.infinity.util.DataString; import org.infinity.util.DebugTimer; +import org.infinity.util.Logger; import org.infinity.util.Platform; import org.infinity.util.Table2da; import org.infinity.util.Table2daCache; import org.infinity.util.io.DlcManager; import org.infinity.util.io.FileEx; import org.infinity.util.io.FileManager; -import org.tinylog.Logger; /** * Provides engine- and game-specific properties of the currently opened Infinity Engine game.
diff --git a/src/org/infinity/resource/ResourceFactory.java b/src/org/infinity/resource/ResourceFactory.java index b46910052..4fb7bf655 100644 --- a/src/org/infinity/resource/ResourceFactory.java +++ b/src/org/infinity/resource/ResourceFactory.java @@ -88,12 +88,12 @@ import org.infinity.util.CreMapCache; import org.infinity.util.DynamicArray; import org.infinity.util.IdsMapCache; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.StaticSimpleXorDecryptor; import org.infinity.util.io.FileEx; import org.infinity.util.io.FileManager; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * Handles game-specific resource access. diff --git a/src/org/infinity/resource/StructureFactory.java b/src/org/infinity/resource/StructureFactory.java index a239c342e..ecb852a51 100644 --- a/src/org/infinity/resource/StructureFactory.java +++ b/src/org/infinity/resource/StructureFactory.java @@ -20,12 +20,12 @@ import org.infinity.gui.NewChrSettings; import org.infinity.gui.NewProSettings; import org.infinity.gui.NewResSettings; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.ResourceStructure; import org.infinity.util.io.FileEx; import org.infinity.util.io.FileManager; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; // Create different pre-initialized IE game resources from scratch and writes them to disk. public final class StructureFactory { diff --git a/src/org/infinity/resource/are/AreResource.java b/src/org/infinity/resource/are/AreResource.java index 59b5f9f24..4cd743228 100644 --- a/src/org/infinity/resource/are/AreResource.java +++ b/src/org/infinity/resource/are/AreResource.java @@ -8,7 +8,11 @@ import java.io.IOException; import java.io.OutputStream; import java.nio.ByteBuffer; -import java.util.*; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Objects; +import java.util.Set; import java.util.regex.Pattern; import javax.swing.BorderFactory; @@ -46,13 +50,13 @@ import org.infinity.resource.wmp.WmpResource; import org.infinity.search.SearchOptions; import org.infinity.util.IdsMapCache; +import org.infinity.util.Logger; import org.infinity.util.LuaEntry; import org.infinity.util.LuaParser; import org.infinity.util.StringTable; import org.infinity.util.Table2da; import org.infinity.util.Table2daCache; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * The ARE resource describes the content of an area (rather than its visual representation). ARE files contain the list diff --git a/src/org/infinity/resource/are/viewer/AreaViewer.java b/src/org/infinity/resource/are/viewer/AreaViewer.java index 6897c621d..49cd68307 100644 --- a/src/org/infinity/resource/are/viewer/AreaViewer.java +++ b/src/org/infinity/resource/are/viewer/AreaViewer.java @@ -115,9 +115,9 @@ import org.infinity.resource.key.ResourceEntry; import org.infinity.resource.wed.Overlay; import org.infinity.resource.wed.WedResource; +import org.infinity.util.Logger; import org.infinity.util.io.FileManager; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * The Area Viewer shows a selected map with its associated structures, such as actors, regions or animations. diff --git a/src/org/infinity/resource/are/viewer/LayerActor.java b/src/org/infinity/resource/are/viewer/LayerActor.java index d8f0cb54a..8c0fd0533 100644 --- a/src/org/infinity/resource/are/viewer/LayerActor.java +++ b/src/org/infinity/resource/are/viewer/LayerActor.java @@ -33,7 +33,7 @@ import org.infinity.util.IniMapCache; import org.infinity.util.IniMapEntry; import org.infinity.util.IniMapSection; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Manages actor layer objects. diff --git a/src/org/infinity/resource/are/viewer/LayerAutomap.java b/src/org/infinity/resource/are/viewer/LayerAutomap.java index 5726cd5c7..f7e0d6a8b 100644 --- a/src/org/infinity/resource/are/viewer/LayerAutomap.java +++ b/src/org/infinity/resource/are/viewer/LayerAutomap.java @@ -16,7 +16,7 @@ import org.infinity.util.IniMap; import org.infinity.util.IniMapCache; import org.infinity.util.IniMapSection; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Manages automap notes layer objects (both PST-specific and generic types). diff --git a/src/org/infinity/resource/are/viewer/LayerDoor.java b/src/org/infinity/resource/are/viewer/LayerDoor.java index 67d77b763..116afea87 100644 --- a/src/org/infinity/resource/are/viewer/LayerDoor.java +++ b/src/org/infinity/resource/are/viewer/LayerDoor.java @@ -10,7 +10,7 @@ import org.infinity.gui.layeritem.AbstractLayerItem; import org.infinity.resource.are.AreResource; import org.infinity.resource.are.Door; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Manages door layer objects. diff --git a/src/org/infinity/resource/are/viewer/LayerManager.java b/src/org/infinity/resource/are/viewer/LayerManager.java index 03eb6d1bd..3d0bb772f 100644 --- a/src/org/infinity/resource/are/viewer/LayerManager.java +++ b/src/org/infinity/resource/are/viewer/LayerManager.java @@ -10,7 +10,7 @@ import org.infinity.resource.are.AreResource; import org.infinity.resource.are.viewer.ViewerConstants.LayerType; import org.infinity.resource.wed.WedResource; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Manages all layer objects of a single ARE map. diff --git a/src/org/infinity/resource/are/viewer/LayerObjectAmbient.java b/src/org/infinity/resource/are/viewer/LayerObjectAmbient.java index 9ee9593b1..c2e028392 100644 --- a/src/org/infinity/resource/are/viewer/LayerObjectAmbient.java +++ b/src/org/infinity/resource/are/viewer/LayerObjectAmbient.java @@ -22,7 +22,7 @@ import org.infinity.resource.are.Ambient; import org.infinity.resource.are.AreResource; import org.infinity.resource.are.viewer.icon.ViewerIcons; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Handles specific layer type: ARE/Ambient Sound and Ambient Sound Range diff --git a/src/org/infinity/resource/are/viewer/LayerObjectAnimation.java b/src/org/infinity/resource/are/viewer/LayerObjectAnimation.java index e03589112..d5049b944 100644 --- a/src/org/infinity/resource/are/viewer/LayerObjectAnimation.java +++ b/src/org/infinity/resource/are/viewer/LayerObjectAnimation.java @@ -27,8 +27,8 @@ import org.infinity.resource.graphics.PseudoBamDecoder; import org.infinity.resource.key.FileResourceEntry; import org.infinity.resource.key.ResourceEntry; +import org.infinity.util.Logger; import org.infinity.util.io.FileManager; -import org.tinylog.Logger; /** * Handles specific layer type: ARE/Background Animation diff --git a/src/org/infinity/resource/are/viewer/LayerObjectAreActor.java b/src/org/infinity/resource/are/viewer/LayerObjectAreActor.java index f041fc785..b442bd1b4 100644 --- a/src/org/infinity/resource/are/viewer/LayerObjectAreActor.java +++ b/src/org/infinity/resource/are/viewer/LayerObjectAreActor.java @@ -23,7 +23,7 @@ import org.infinity.resource.are.viewer.icon.ViewerIcons; import org.infinity.resource.cre.CreResource; import org.infinity.resource.key.ResourceEntry; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Handles specific layer type: ARE/Actor diff --git a/src/org/infinity/resource/are/viewer/LayerObjectAutomap.java b/src/org/infinity/resource/are/viewer/LayerObjectAutomap.java index 39d3b5f17..5568978b8 100644 --- a/src/org/infinity/resource/are/viewer/LayerObjectAutomap.java +++ b/src/org/infinity/resource/are/viewer/LayerObjectAutomap.java @@ -17,8 +17,8 @@ import org.infinity.resource.are.viewer.icon.ViewerIcons; import org.infinity.resource.key.FileResourceEntry; import org.infinity.resource.to.TohResource; +import org.infinity.util.Logger; import org.infinity.util.io.FileManager; -import org.tinylog.Logger; /** * Handles specific layer type: ARE/Automap Note (except for PST) diff --git a/src/org/infinity/resource/are/viewer/LayerObjectAutomapPST.java b/src/org/infinity/resource/are/viewer/LayerObjectAutomapPST.java index 533a1ff4e..8463bdbb4 100644 --- a/src/org/infinity/resource/are/viewer/LayerObjectAutomapPST.java +++ b/src/org/infinity/resource/are/viewer/LayerObjectAutomapPST.java @@ -14,7 +14,7 @@ import org.infinity.resource.are.AreResource; import org.infinity.resource.are.AutomapNotePST; import org.infinity.resource.are.viewer.icon.ViewerIcons; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Handles specific layer type: ARE/Automap Note (PST-specific, user-defined) diff --git a/src/org/infinity/resource/are/viewer/LayerObjectContainer.java b/src/org/infinity/resource/are/viewer/LayerObjectContainer.java index 8710bc055..3edc8b6aa 100644 --- a/src/org/infinity/resource/are/viewer/LayerObjectContainer.java +++ b/src/org/infinity/resource/are/viewer/LayerObjectContainer.java @@ -21,7 +21,7 @@ import org.infinity.resource.are.Container; import org.infinity.resource.are.viewer.icon.ViewerIcons; import org.infinity.resource.vertex.Vertex; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Handles specific layer type: ARE/Container diff --git a/src/org/infinity/resource/are/viewer/LayerObjectDoor.java b/src/org/infinity/resource/are/viewer/LayerObjectDoor.java index 0e9f6b3bd..12c88d7aa 100644 --- a/src/org/infinity/resource/are/viewer/LayerObjectDoor.java +++ b/src/org/infinity/resource/are/viewer/LayerObjectDoor.java @@ -9,7 +9,11 @@ import java.awt.Point; import java.awt.Polygon; import java.awt.Rectangle; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Objects; import java.util.stream.Collectors; import org.infinity.datatype.Flag; @@ -24,7 +28,7 @@ import org.infinity.resource.are.viewer.icon.ViewerIcons; import org.infinity.resource.vertex.ClosedVertex; import org.infinity.resource.vertex.OpenVertex; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Handles specific layer type: ARE/Door diff --git a/src/org/infinity/resource/are/viewer/LayerObjectDoorCells.java b/src/org/infinity/resource/are/viewer/LayerObjectDoorCells.java index fa4a38ddf..73a3260a4 100644 --- a/src/org/infinity/resource/are/viewer/LayerObjectDoorCells.java +++ b/src/org/infinity/resource/are/viewer/LayerObjectDoorCells.java @@ -8,7 +8,12 @@ import java.awt.Point; import java.awt.Polygon; import java.awt.Rectangle; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Objects; import java.util.stream.Collectors; import org.infinity.datatype.IsNumeric; @@ -20,7 +25,7 @@ import org.infinity.resource.are.Door; import org.infinity.resource.vertex.ClosedVertexImpeded; import org.infinity.resource.vertex.OpenVertexImpeded; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Handles specific layer subtype: ARE/Door blocked cells diff --git a/src/org/infinity/resource/are/viewer/LayerObjectDoorPoly.java b/src/org/infinity/resource/are/viewer/LayerObjectDoorPoly.java index 835f76900..8f6e6926d 100644 --- a/src/org/infinity/resource/are/viewer/LayerObjectDoorPoly.java +++ b/src/org/infinity/resource/are/viewer/LayerObjectDoorPoly.java @@ -23,7 +23,7 @@ import org.infinity.resource.vertex.Vertex; import org.infinity.resource.wed.Door; import org.infinity.resource.wed.WedResource; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Handles specific layer type: WED/Door Polygon. diff --git a/src/org/infinity/resource/are/viewer/LayerObjectEntrance.java b/src/org/infinity/resource/are/viewer/LayerObjectEntrance.java index f4b15f787..ad9b73e7c 100644 --- a/src/org/infinity/resource/are/viewer/LayerObjectEntrance.java +++ b/src/org/infinity/resource/are/viewer/LayerObjectEntrance.java @@ -15,7 +15,7 @@ import org.infinity.resource.are.AreResource; import org.infinity.resource.are.Entrance; import org.infinity.resource.are.viewer.icon.ViewerIcons; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Handles specific layer type: ARE/Entrance diff --git a/src/org/infinity/resource/are/viewer/LayerObjectGlobalActor.java b/src/org/infinity/resource/are/viewer/LayerObjectGlobalActor.java index 4dd924458..8516a54ed 100644 --- a/src/org/infinity/resource/are/viewer/LayerObjectGlobalActor.java +++ b/src/org/infinity/resource/are/viewer/LayerObjectGlobalActor.java @@ -23,7 +23,7 @@ import org.infinity.resource.gam.GamResource; import org.infinity.resource.gam.PartyNPC; import org.infinity.resource.key.ResourceEntry; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Handles specific layer type: global GAM/Actor diff --git a/src/org/infinity/resource/are/viewer/LayerObjectIniActor.java b/src/org/infinity/resource/are/viewer/LayerObjectIniActor.java index b70d29a14..4801aa3ff 100644 --- a/src/org/infinity/resource/are/viewer/LayerObjectIniActor.java +++ b/src/org/infinity/resource/are/viewer/LayerObjectIniActor.java @@ -21,7 +21,7 @@ import org.infinity.resource.text.PlainTextResource; import org.infinity.util.IniMapEntry; import org.infinity.util.IniMapSection; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Handles specific layer type: INI/Actor diff --git a/src/org/infinity/resource/are/viewer/LayerObjectProTrap.java b/src/org/infinity/resource/are/viewer/LayerObjectProTrap.java index a1cfc3d21..63c0446f3 100644 --- a/src/org/infinity/resource/are/viewer/LayerObjectProTrap.java +++ b/src/org/infinity/resource/are/viewer/LayerObjectProTrap.java @@ -14,7 +14,7 @@ import org.infinity.resource.are.AreResource; import org.infinity.resource.are.ProTrap; import org.infinity.resource.are.viewer.icon.ViewerIcons; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Handles specific layer type: ARE/Projectile Trap diff --git a/src/org/infinity/resource/are/viewer/LayerObjectRegion.java b/src/org/infinity/resource/are/viewer/LayerObjectRegion.java index 34a2d3b29..c6a2786c5 100644 --- a/src/org/infinity/resource/are/viewer/LayerObjectRegion.java +++ b/src/org/infinity/resource/are/viewer/LayerObjectRegion.java @@ -24,7 +24,7 @@ import org.infinity.resource.are.ITEPoint; import org.infinity.resource.are.viewer.icon.ViewerIcons; import org.infinity.resource.vertex.Vertex; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Handles specific layer type: ARE/Region diff --git a/src/org/infinity/resource/are/viewer/LayerObjectSpawnPoint.java b/src/org/infinity/resource/are/viewer/LayerObjectSpawnPoint.java index 01ff372a5..88b49c8b9 100644 --- a/src/org/infinity/resource/are/viewer/LayerObjectSpawnPoint.java +++ b/src/org/infinity/resource/are/viewer/LayerObjectSpawnPoint.java @@ -15,7 +15,7 @@ import org.infinity.resource.are.AreResource; import org.infinity.resource.are.SpawnPoint; import org.infinity.resource.are.viewer.icon.ViewerIcons; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Handles specific layer type: ARE/Spawn Point diff --git a/src/org/infinity/resource/are/viewer/LayerObjectTransition.java b/src/org/infinity/resource/are/viewer/LayerObjectTransition.java index aa22406bc..27130eef7 100644 --- a/src/org/infinity/resource/are/viewer/LayerObjectTransition.java +++ b/src/org/infinity/resource/are/viewer/LayerObjectTransition.java @@ -13,7 +13,7 @@ import org.infinity.gui.layeritem.ShapedLayerItem; import org.infinity.resource.Viewable; import org.infinity.resource.are.AreResource; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Handles specific layer type: ARE/Map transition diff --git a/src/org/infinity/resource/are/viewer/LayerObjectWallPoly.java b/src/org/infinity/resource/are/viewer/LayerObjectWallPoly.java index bcb552a46..9086163ad 100644 --- a/src/org/infinity/resource/are/viewer/LayerObjectWallPoly.java +++ b/src/org/infinity/resource/are/viewer/LayerObjectWallPoly.java @@ -17,7 +17,7 @@ import org.infinity.resource.vertex.Vertex; import org.infinity.resource.wed.WallPolygon; import org.infinity.resource.wed.WedResource; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Handles specific layer type: ARE/Wall Polygon diff --git a/src/org/infinity/resource/are/viewer/LayerTransition.java b/src/org/infinity/resource/are/viewer/LayerTransition.java index 301967190..c6b81ea18 100644 --- a/src/org/infinity/resource/are/viewer/LayerTransition.java +++ b/src/org/infinity/resource/are/viewer/LayerTransition.java @@ -9,7 +9,7 @@ import org.infinity.datatype.ResourceRef; import org.infinity.resource.ResourceFactory; import org.infinity.resource.are.AreResource; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Manages map transition layer objects. diff --git a/src/org/infinity/resource/are/viewer/Settings.java b/src/org/infinity/resource/are/viewer/Settings.java index d88629132..801f17367 100644 --- a/src/org/infinity/resource/are/viewer/Settings.java +++ b/src/org/infinity/resource/are/viewer/Settings.java @@ -12,7 +12,7 @@ import org.infinity.resource.are.viewer.ViewerConstants.LayerStackingType; import org.infinity.resource.are.viewer.ViewerConstants.LayerType; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Manages global area viewer settings. diff --git a/src/org/infinity/resource/are/viewer/TilesetRenderer.java b/src/org/infinity/resource/are/viewer/TilesetRenderer.java index 5d9eb91bd..48e627506 100644 --- a/src/org/infinity/resource/are/viewer/TilesetRenderer.java +++ b/src/org/infinity/resource/are/viewer/TilesetRenderer.java @@ -31,7 +31,7 @@ import org.infinity.resource.wed.Overlay; import org.infinity.resource.wed.Tilemap; import org.infinity.resource.wed.WedResource; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Specialized renderer for drawing tileset-based graphics data. diff --git a/src/org/infinity/resource/bcs/BafResource.java b/src/org/infinity/resource/bcs/BafResource.java index 977db7866..483395ce3 100644 --- a/src/org/infinity/resource/bcs/BafResource.java +++ b/src/org/infinity/resource/bcs/BafResource.java @@ -54,10 +54,10 @@ import org.infinity.resource.Writeable; import org.infinity.resource.key.ResourceEntry; import org.infinity.search.TextResourceSearcher; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.StaticSimpleXorDecryptor; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public class BafResource implements TextResource, Writeable, Closeable, ItemListener, ActionListener, DocumentListener { // for source panel diff --git a/src/org/infinity/resource/bcs/BcsAction.java b/src/org/infinity/resource/bcs/BcsAction.java index ce8da5153..99f81f200 100644 --- a/src/org/infinity/resource/bcs/BcsAction.java +++ b/src/org/infinity/resource/bcs/BcsAction.java @@ -7,8 +7,8 @@ import java.awt.Point; import java.util.Arrays; +import org.infinity.util.Logger; import org.infinity.util.StringBufferStream; -import org.tinylog.Logger; /** * Handles BCS action (AC) byte code structures. diff --git a/src/org/infinity/resource/bcs/BcsObject.java b/src/org/infinity/resource/bcs/BcsObject.java index e04570fa6..df0ef65e5 100644 --- a/src/org/infinity/resource/bcs/BcsObject.java +++ b/src/org/infinity/resource/bcs/BcsObject.java @@ -7,8 +7,8 @@ import java.awt.Rectangle; import org.infinity.resource.Profile; +import org.infinity.util.Logger; import org.infinity.util.StringBufferStream; -import org.tinylog.Logger; /** * Handles BCS object (OB) byte code structures. diff --git a/src/org/infinity/resource/bcs/BcsResource.java b/src/org/infinity/resource/bcs/BcsResource.java index ee9522b7b..4be23cc6e 100644 --- a/src/org/infinity/resource/bcs/BcsResource.java +++ b/src/org/infinity/resource/bcs/BcsResource.java @@ -59,10 +59,10 @@ import org.infinity.search.ScriptReferenceSearcher; import org.infinity.search.TextResourceSearcher; import org.infinity.util.IdsMap; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.StaticSimpleXorDecryptor; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * This resource represent scripted actions. {@code .bcs} files are scripts attached to anything other than the player diff --git a/src/org/infinity/resource/bcs/BcsTrigger.java b/src/org/infinity/resource/bcs/BcsTrigger.java index 4ed99bc89..b6a1be7b6 100644 --- a/src/org/infinity/resource/bcs/BcsTrigger.java +++ b/src/org/infinity/resource/bcs/BcsTrigger.java @@ -10,8 +10,8 @@ import java.util.Map; import org.infinity.resource.Profile; +import org.infinity.util.Logger; import org.infinity.util.StringBufferStream; -import org.tinylog.Logger; /** * Handles BCS trigger (TR) byte code structures. diff --git a/src/org/infinity/resource/bcs/Compiler.java b/src/org/infinity/resource/bcs/Compiler.java index 185d90e1c..40f865ed7 100644 --- a/src/org/infinity/resource/bcs/Compiler.java +++ b/src/org/infinity/resource/bcs/Compiler.java @@ -24,9 +24,9 @@ import org.infinity.util.BOMStringReader; import org.infinity.util.CreMapCache; import org.infinity.util.IdsMapCache; +import org.infinity.util.Logger; import org.infinity.util.StringTable; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public class Compiler { private static final HashMap TOKEN_SYMBOL_TO_DESC_MAP = new HashMap<>(); diff --git a/src/org/infinity/resource/bcs/Decompiler.java b/src/org/infinity/resource/bcs/Decompiler.java index 3dbf3035d..c4983de39 100644 --- a/src/org/infinity/resource/bcs/Decompiler.java +++ b/src/org/infinity/resource/bcs/Decompiler.java @@ -26,10 +26,10 @@ import org.infinity.util.IdsMap; import org.infinity.util.IdsMapCache; import org.infinity.util.IdsMapEntry; +import org.infinity.util.Logger; import org.infinity.util.StringBufferStream; import org.infinity.util.StringTable; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public final class Decompiler { // List of IDS resources containing bitwise entries diff --git a/src/org/infinity/resource/cre/CreResource.java b/src/org/infinity/resource/cre/CreResource.java index d90c71ca9..b7b50d489 100644 --- a/src/org/infinity/resource/cre/CreResource.java +++ b/src/org/infinity/resource/cre/CreResource.java @@ -75,11 +75,11 @@ import org.infinity.util.IniMapCache; import org.infinity.util.IniMapEntry; import org.infinity.util.IniMapSection; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.StringTable; import org.infinity.util.Table2da; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * This resource describes a "creature". Creatures have several stats (some visible through the game UI) which are diff --git a/src/org/infinity/resource/cre/ViewerAnimation.java b/src/org/infinity/resource/cre/ViewerAnimation.java index 21cda12a6..18128fb4a 100644 --- a/src/org/infinity/resource/cre/ViewerAnimation.java +++ b/src/org/infinity/resource/cre/ViewerAnimation.java @@ -47,7 +47,7 @@ import org.infinity.resource.cre.decoder.util.Sequence; import org.infinity.resource.cre.decoder.util.SpriteUtils; import org.infinity.resource.graphics.ColorConvert; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * A basic creature animation viewer. diff --git a/src/org/infinity/resource/cre/browser/ColorSelectionModel.java b/src/org/infinity/resource/cre/browser/ColorSelectionModel.java index acd608322..3792d26ad 100644 --- a/src/org/infinity/resource/cre/browser/ColorSelectionModel.java +++ b/src/org/infinity/resource/cre/browser/ColorSelectionModel.java @@ -37,10 +37,10 @@ import org.infinity.util.IdsMap; import org.infinity.util.IdsMapCache; import org.infinity.util.IdsMapEntry; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.Table2da; import org.infinity.util.Table2daCache; -import org.tinylog.Logger; /** * {@code ComboBoxModel} for the color selection combo box used in the Creature Animation Browser. diff --git a/src/org/infinity/resource/cre/browser/CreUtils.java b/src/org/infinity/resource/cre/browser/CreUtils.java index 1c9c11388..f96e3a6e7 100644 --- a/src/org/infinity/resource/cre/browser/CreUtils.java +++ b/src/org/infinity/resource/cre/browser/CreUtils.java @@ -24,8 +24,8 @@ import org.infinity.resource.cre.Item; import org.infinity.resource.cre.decoder.util.ItemInfo; import org.infinity.resource.key.ResourceEntry; +import org.infinity.util.Logger; import org.infinity.util.Misc; -import org.tinylog.Logger; /** * Collection of methods for creating and manipulating CRE resources. diff --git a/src/org/infinity/resource/cre/browser/CreatureAnimationModel.java b/src/org/infinity/resource/cre/browser/CreatureAnimationModel.java index 6c8daa4bd..6f332a1c4 100644 --- a/src/org/infinity/resource/cre/browser/CreatureAnimationModel.java +++ b/src/org/infinity/resource/cre/browser/CreatureAnimationModel.java @@ -17,7 +17,7 @@ import org.infinity.util.IdsMap; import org.infinity.util.IdsMapCache; import org.infinity.util.IdsMapEntry; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * {@code ComboBoxModel} for the creature animation combo box used in the Creature Animation Browser. diff --git a/src/org/infinity/resource/cre/browser/CreatureBrowser.java b/src/org/infinity/resource/cre/browser/CreatureBrowser.java index 63b5d3649..2f8ea1582 100644 --- a/src/org/infinity/resource/cre/browser/CreatureBrowser.java +++ b/src/org/infinity/resource/cre/browser/CreatureBrowser.java @@ -27,7 +27,7 @@ import org.infinity.resource.cre.CreResource; import org.infinity.resource.cre.decoder.SpriteDecoder; import org.infinity.resource.cre.decoder.util.SpriteUtils; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * The Creature Browser implements a highly customizable browser and viewer for creature animations. diff --git a/src/org/infinity/resource/cre/browser/CreatureControlModel.java b/src/org/infinity/resource/cre/browser/CreatureControlModel.java index d30a3c37d..11c5dcc68 100644 --- a/src/org/infinity/resource/cre/browser/CreatureControlModel.java +++ b/src/org/infinity/resource/cre/browser/CreatureControlModel.java @@ -20,7 +20,7 @@ import org.infinity.resource.cre.decoder.util.ItemInfo; import org.infinity.resource.cre.decoder.util.ItemInfo.ItemPredicate; import org.infinity.resource.key.ResourceEntry; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * This model controls the relationships between creature controls and provides access to the various creature-specific diff --git a/src/org/infinity/resource/cre/browser/CreatureControlPanel.java b/src/org/infinity/resource/cre/browser/CreatureControlPanel.java index b741008b0..bbc3d6219 100644 --- a/src/org/infinity/resource/cre/browser/CreatureControlPanel.java +++ b/src/org/infinity/resource/cre/browser/CreatureControlPanel.java @@ -43,8 +43,8 @@ import org.infinity.util.IdsMap; import org.infinity.util.IdsMapCache; import org.infinity.util.IdsMapEntry; +import org.infinity.util.Logger; import org.infinity.util.Misc; -import org.tinylog.Logger; /** * This panel provides controls for customizing various aspects of a CRE resource. diff --git a/src/org/infinity/resource/cre/browser/CreatureSelectionModel.java b/src/org/infinity/resource/cre/browser/CreatureSelectionModel.java index 1414ac732..6d34a6d94 100644 --- a/src/org/infinity/resource/cre/browser/CreatureSelectionModel.java +++ b/src/org/infinity/resource/cre/browser/CreatureSelectionModel.java @@ -21,11 +21,11 @@ import org.infinity.resource.cre.CreResource; import org.infinity.resource.key.BufferedResourceEntry; import org.infinity.resource.key.ResourceEntry; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.ResourceStructure; import org.infinity.util.io.StreamUtils; import org.infinity.util.tuples.Couple; -import org.tinylog.Logger; /** * {@code ComboBoxModel} for the creature selection combo box used in the Creature Animation Browser. diff --git a/src/org/infinity/resource/cre/browser/MediaPanel.java b/src/org/infinity/resource/cre/browser/MediaPanel.java index 724e811be..929eaa4ec 100644 --- a/src/org/infinity/resource/cre/browser/MediaPanel.java +++ b/src/org/infinity/resource/cre/browser/MediaPanel.java @@ -52,8 +52,8 @@ import org.infinity.resource.cre.decoder.util.Direction; import org.infinity.resource.cre.decoder.util.Sequence; import org.infinity.resource.graphics.ColorConvert; +import org.infinity.util.Logger; import org.infinity.util.tuples.Couple; -import org.tinylog.Logger; import ork.sevenstates.apng.APNGSeqWriter; diff --git a/src/org/infinity/resource/cre/browser/bg/Backgrounds.java b/src/org/infinity/resource/cre/browser/bg/Backgrounds.java index 705d06587..78ba31e74 100644 --- a/src/org/infinity/resource/cre/browser/bg/Backgrounds.java +++ b/src/org/infinity/resource/cre/browser/bg/Backgrounds.java @@ -15,7 +15,7 @@ import javax.swing.UIManager; import org.infinity.resource.Profile; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Backgrounds for the creature animation browser. diff --git a/src/org/infinity/resource/cre/decoder/PlaceholderDecoder.java b/src/org/infinity/resource/cre/decoder/PlaceholderDecoder.java index 524cd5ac7..9f720c617 100644 --- a/src/org/infinity/resource/cre/decoder/PlaceholderDecoder.java +++ b/src/org/infinity/resource/cre/decoder/PlaceholderDecoder.java @@ -23,8 +23,8 @@ import org.infinity.util.IniMap; import org.infinity.util.IniMapEntry; import org.infinity.util.IniMapSection; +import org.infinity.util.Logger; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * General-purpose creature animation decoder for handling non-existing or unknown animation types. diff --git a/src/org/infinity/resource/cre/decoder/SpriteDecoder.java b/src/org/infinity/resource/cre/decoder/SpriteDecoder.java index ef05fb96e..36874620f 100644 --- a/src/org/infinity/resource/cre/decoder/SpriteDecoder.java +++ b/src/org/infinity/resource/cre/decoder/SpriteDecoder.java @@ -58,9 +58,9 @@ import org.infinity.resource.key.ResourceEntry; import org.infinity.util.IniMap; import org.infinity.util.IniMapSection; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.tuples.Couple; -import org.tinylog.Logger; /** * Specialized BAM decoder for creature animation sprites. diff --git a/src/org/infinity/resource/cre/decoder/tables/InfinityTables.java b/src/org/infinity/resource/cre/decoder/tables/InfinityTables.java index 110103fab..5f6829df4 100644 --- a/src/org/infinity/resource/cre/decoder/tables/InfinityTables.java +++ b/src/org/infinity/resource/cre/decoder/tables/InfinityTables.java @@ -20,8 +20,8 @@ import org.infinity.util.IdsMap; import org.infinity.util.IdsMapEntry; import org.infinity.util.IniMap; +import org.infinity.util.Logger; import org.infinity.util.Misc; -import org.tinylog.Logger; /** * A static class dedicated to processing Infinity Animation slots. diff --git a/src/org/infinity/resource/cre/decoder/tables/SpriteTables.java b/src/org/infinity/resource/cre/decoder/tables/SpriteTables.java index 516929013..960f3c377 100644 --- a/src/org/infinity/resource/cre/decoder/tables/SpriteTables.java +++ b/src/org/infinity/resource/cre/decoder/tables/SpriteTables.java @@ -9,7 +9,11 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.nio.ByteBuffer; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.EnumMap; +import java.util.List; import org.infinity.resource.Profile; import org.infinity.resource.cre.decoder.MonsterPlanescapeDecoder; @@ -18,8 +22,8 @@ import org.infinity.resource.key.BufferedResourceEntry; import org.infinity.resource.key.ResourceEntry; import org.infinity.util.IniMap; +import org.infinity.util.Logger; import org.infinity.util.Table2da; -import org.tinylog.Logger; /** * A static class that provides information and methods for hardcoded creature animations. diff --git a/src/org/infinity/resource/cre/decoder/util/AnimationInfo.java b/src/org/infinity/resource/cre/decoder/util/AnimationInfo.java index 53d440cd4..9dea2dfa6 100644 --- a/src/org/infinity/resource/cre/decoder/util/AnimationInfo.java +++ b/src/org/infinity/resource/cre/decoder/util/AnimationInfo.java @@ -4,12 +4,17 @@ package org.infinity.resource.cre.decoder.util; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.EnumMap; +import java.util.EnumSet; +import java.util.List; import org.infinity.resource.Profile; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.tuples.Couple; -import org.tinylog.Logger; /** * Static class containing animation slot and type information. diff --git a/src/org/infinity/resource/cre/decoder/util/CreatureInfo.java b/src/org/infinity/resource/cre/decoder/util/CreatureInfo.java index 20984bd83..cfd91bb68 100644 --- a/src/org/infinity/resource/cre/decoder/util/CreatureInfo.java +++ b/src/org/infinity/resource/cre/decoder/util/CreatureInfo.java @@ -29,11 +29,11 @@ import org.infinity.resource.cre.decoder.MonsterPlanescapeDecoder; import org.infinity.resource.cre.decoder.SpriteDecoder; import org.infinity.resource.key.ResourceEntry; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.Table2da; import org.infinity.util.Table2daCache; import org.infinity.util.tuples.Couple; -import org.tinylog.Logger; /** * Provides useful information about a creature resource and their equipment. diff --git a/src/org/infinity/resource/cre/decoder/util/EffectInfo.java b/src/org/infinity/resource/cre/decoder/util/EffectInfo.java index 8f7a80bdb..f7f1431e5 100644 --- a/src/org/infinity/resource/cre/decoder/util/EffectInfo.java +++ b/src/org/infinity/resource/cre/decoder/util/EffectInfo.java @@ -24,11 +24,11 @@ import org.infinity.resource.cre.CreResource; import org.infinity.resource.key.ResourceEntry; import org.infinity.resource.spl.SplResource; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.Table2da; import org.infinity.util.Table2daCache; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * Manages effects opcodes for a specific target. diff --git a/src/org/infinity/resource/cre/decoder/util/ItemInfo.java b/src/org/infinity/resource/cre/decoder/util/ItemInfo.java index 7b9dca671..3efaebb39 100644 --- a/src/org/infinity/resource/cre/decoder/util/ItemInfo.java +++ b/src/org/infinity/resource/cre/decoder/util/ItemInfo.java @@ -21,10 +21,10 @@ import org.infinity.resource.ResourceFactory; import org.infinity.resource.key.ResourceEntry; import org.infinity.util.DynamicArray; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.StringTable; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * Provides useful information about equippable items. diff --git a/src/org/infinity/resource/cre/decoder/util/SpriteUtils.java b/src/org/infinity/resource/cre/decoder/util/SpriteUtils.java index d472b9971..8db51f420 100644 --- a/src/org/infinity/resource/cre/decoder/util/SpriteUtils.java +++ b/src/org/infinity/resource/cre/decoder/util/SpriteUtils.java @@ -60,12 +60,12 @@ import org.infinity.util.IniMapCache; import org.infinity.util.IniMapEntry; import org.infinity.util.IniMapSection; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.Table2da; import org.infinity.util.Table2daCache; import org.infinity.util.io.StreamUtils; import org.infinity.util.tuples.Couple; -import org.tinylog.Logger; /** * Collection of helpful methods for Sprite rendering. diff --git a/src/org/infinity/resource/dlg/AbstractCode.java b/src/org/infinity/resource/dlg/AbstractCode.java index dfd23fe7e..5e42cee6d 100644 --- a/src/org/infinity/resource/dlg/AbstractCode.java +++ b/src/org/infinity/resource/dlg/AbstractCode.java @@ -45,9 +45,9 @@ import org.infinity.resource.bcs.Compiler; import org.infinity.resource.bcs.ScriptMessage; import org.infinity.resource.bcs.ScriptType; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public abstract class AbstractCode extends Datatype implements Editable, IsTextual, AddRemovable, ActionListener, DocumentListener, ItemListener { diff --git a/src/org/infinity/resource/dlg/DlgResource.java b/src/org/infinity/resource/dlg/DlgResource.java index 2749d06d9..e569044fc 100644 --- a/src/org/infinity/resource/dlg/DlgResource.java +++ b/src/org/infinity/resource/dlg/DlgResource.java @@ -48,9 +48,9 @@ import org.infinity.resource.StructEntry; import org.infinity.resource.key.ResourceEntry; import org.infinity.updater.Utils; +import org.infinity.util.Logger; import org.infinity.util.StringTable; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * DLG resource contains the structure of conversation, in what is effectievly a state machine. Dialogs contains string diff --git a/src/org/infinity/resource/dlg/DlgTreeModel.java b/src/org/infinity/resource/dlg/DlgTreeModel.java index 62056bd1d..22271de2d 100644 --- a/src/org/infinity/resource/dlg/DlgTreeModel.java +++ b/src/org/infinity/resource/dlg/DlgTreeModel.java @@ -35,7 +35,7 @@ import org.infinity.resource.ResourceFactory; import org.infinity.resource.StructEntry; import org.infinity.resource.key.ResourceEntry; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** Creates and manages the dialog tree structure. */ public class DlgTreeModel implements TreeModel, TreeNode, TableModelListener, PropertyChangeListener { diff --git a/src/org/infinity/resource/dlg/TreeWorker.java b/src/org/infinity/resource/dlg/TreeWorker.java index 0f2d5ad59..ef8f9cfc7 100644 --- a/src/org/infinity/resource/dlg/TreeWorker.java +++ b/src/org/infinity/resource/dlg/TreeWorker.java @@ -13,7 +13,7 @@ import javax.swing.tree.TreeModel; import javax.swing.tree.TreePath; -import org.tinylog.Logger; +import org.infinity.util.Logger; //-------------------------- INNER CLASSES -------------------------- diff --git a/src/org/infinity/resource/dlg/Viewer.java b/src/org/infinity/resource/dlg/Viewer.java index f259e5589..355a24276 100644 --- a/src/org/infinity/resource/dlg/Viewer.java +++ b/src/org/infinity/resource/dlg/Viewer.java @@ -51,9 +51,9 @@ import org.infinity.resource.bcs.ScriptType; import org.infinity.resource.key.ResourceEntry; import org.infinity.search.DialogSearcher; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.StringTable; -import org.tinylog.Logger; public class Viewer extends JPanel implements ActionListener, ItemListener, TableModelListener { private static final ButtonPanel.Control CTRL_NEXT_STATE = ButtonPanel.Control.CUSTOM_1; diff --git a/src/org/infinity/resource/effects/BaseOpcode.java b/src/org/infinity/resource/effects/BaseOpcode.java index 5ec0624c9..6d89e7e50 100644 --- a/src/org/infinity/resource/effects/BaseOpcode.java +++ b/src/org/infinity/resource/effects/BaseOpcode.java @@ -31,12 +31,12 @@ import org.infinity.resource.Effect2; import org.infinity.resource.Profile; import org.infinity.resource.StructEntry; +import org.infinity.util.Logger; import org.infinity.util.StringTable; import org.infinity.util.Table2da; import org.infinity.util.Table2daCache; import org.infinity.util.io.ByteBufferOutputStream; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * Base class for opcode-handling classes. Derived classes should handle one opcode per class for all game variants. diff --git a/src/org/infinity/resource/gam/GamResource.java b/src/org/infinity/resource/gam/GamResource.java index 29b53cd59..d77c80784 100644 --- a/src/org/infinity/resource/gam/GamResource.java +++ b/src/org/infinity/resource/gam/GamResource.java @@ -44,8 +44,8 @@ import org.infinity.resource.key.ResourceEntry; import org.infinity.resource.text.QuestsPanel; import org.infinity.resource.text.QuestsResource; +import org.infinity.util.Logger; import org.infinity.util.Variables; -import org.tinylog.Logger; /** * This resource is used to hold game information in save games. The GAM file does not store {@link AreResource area}, diff --git a/src/org/infinity/resource/graphics/BamDecoder.java b/src/org/infinity/resource/graphics/BamDecoder.java index ea60b2ce4..505324c06 100644 --- a/src/org/infinity/resource/graphics/BamDecoder.java +++ b/src/org/infinity/resource/graphics/BamDecoder.java @@ -16,8 +16,8 @@ import java.util.Objects; import org.infinity.resource.key.ResourceEntry; +import org.infinity.util.Logger; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * Common base class for handling BAM resources. diff --git a/src/org/infinity/resource/graphics/BamResource.java b/src/org/infinity/resource/graphics/BamResource.java index 2b325dde4..7120f0090 100644 --- a/src/org/infinity/resource/graphics/BamResource.java +++ b/src/org/infinity/resource/graphics/BamResource.java @@ -78,9 +78,9 @@ import org.infinity.search.ReferenceSearcher; import org.infinity.util.DynamicArray; import org.infinity.util.IntegerHashMap; +import org.infinity.util.Logger; import org.infinity.util.io.FileManager; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; import tv.porst.jhexview.DataChangedEvent; import tv.porst.jhexview.IDataChangedListener; diff --git a/src/org/infinity/resource/graphics/BamV1Decoder.java b/src/org/infinity/resource/graphics/BamV1Decoder.java index 4dd4ce8de..5215f1c05 100644 --- a/src/org/infinity/resource/graphics/BamV1Decoder.java +++ b/src/org/infinity/resource/graphics/BamV1Decoder.java @@ -18,8 +18,8 @@ import org.infinity.resource.Profile; import org.infinity.resource.key.ResourceEntry; +import org.infinity.util.Logger; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * Handles BAM v1 resources (both BAMC and uncompressed BAM V1). diff --git a/src/org/infinity/resource/graphics/BamV2Decoder.java b/src/org/infinity/resource/graphics/BamV2Decoder.java index 574e8a241..8a294ce2e 100644 --- a/src/org/infinity/resource/graphics/BamV2Decoder.java +++ b/src/org/infinity/resource/graphics/BamV2Decoder.java @@ -23,10 +23,10 @@ import org.infinity.resource.ResourceFactory; import org.infinity.resource.key.FileResourceEntry; import org.infinity.resource.key.ResourceEntry; +import org.infinity.util.Logger; import org.infinity.util.io.FileEx; import org.infinity.util.io.FileManager; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * Handles BAM v2 resources. diff --git a/src/org/infinity/resource/graphics/ColorConvert.java b/src/org/infinity/resource/graphics/ColorConvert.java index 6b6858374..c810640d9 100644 --- a/src/org/infinity/resource/graphics/ColorConvert.java +++ b/src/org/infinity/resource/graphics/ColorConvert.java @@ -38,10 +38,10 @@ import org.infinity.resource.key.FileResourceEntry; import org.infinity.resource.key.ResourceEntry; import org.infinity.util.DynamicArray; +import org.infinity.util.Logger; import org.infinity.util.io.FileEx; import org.infinity.util.io.StreamUtils; import org.infinity.util.tuples.Triple; -import org.tinylog.Logger; /** * Contains a set of color-related static methods (little endian order only). diff --git a/src/org/infinity/resource/graphics/GifSequenceReader.java b/src/org/infinity/resource/graphics/GifSequenceReader.java index 95d3efb01..6ee7d12c4 100644 --- a/src/org/infinity/resource/graphics/GifSequenceReader.java +++ b/src/org/infinity/resource/graphics/GifSequenceReader.java @@ -26,7 +26,7 @@ import javax.imageio.metadata.IIOMetadata; import javax.imageio.stream.ImageInputStream; -import org.tinylog.Logger; +import org.infinity.util.Logger; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.NodeList; diff --git a/src/org/infinity/resource/graphics/MosDecoder.java b/src/org/infinity/resource/graphics/MosDecoder.java index 213e20129..91d2812a5 100644 --- a/src/org/infinity/resource/graphics/MosDecoder.java +++ b/src/org/infinity/resource/graphics/MosDecoder.java @@ -9,8 +9,8 @@ import java.nio.ByteBuffer; import org.infinity.resource.key.ResourceEntry; +import org.infinity.util.Logger; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * Common base class for handling MOS resources. diff --git a/src/org/infinity/resource/graphics/MosResource.java b/src/org/infinity/resource/graphics/MosResource.java index dffbbe29f..4e9d3e2bc 100644 --- a/src/org/infinity/resource/graphics/MosResource.java +++ b/src/org/infinity/resource/graphics/MosResource.java @@ -60,8 +60,8 @@ import org.infinity.search.ReferenceSearcher; import org.infinity.util.DynamicArray; import org.infinity.util.IntegerHashMap; +import org.infinity.util.Logger; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * This resource describes static graphics in a tile based bitmap format. Such files are used for mini-maps and GUI diff --git a/src/org/infinity/resource/graphics/MosV1Decoder.java b/src/org/infinity/resource/graphics/MosV1Decoder.java index 8ebadef95..be90ed61c 100644 --- a/src/org/infinity/resource/graphics/MosV1Decoder.java +++ b/src/org/infinity/resource/graphics/MosV1Decoder.java @@ -15,8 +15,8 @@ import org.infinity.resource.key.ResourceEntry; import org.infinity.util.DynamicArray; +import org.infinity.util.Logger; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public class MosV1Decoder extends MosDecoder { private static final int BLOCK_DIMENSION = 64; // default block dimension diff --git a/src/org/infinity/resource/graphics/MosV2Decoder.java b/src/org/infinity/resource/graphics/MosV2Decoder.java index aaff96737..be1357fef 100644 --- a/src/org/infinity/resource/graphics/MosV2Decoder.java +++ b/src/org/infinity/resource/graphics/MosV2Decoder.java @@ -21,8 +21,8 @@ import org.infinity.resource.ResourceFactory; import org.infinity.resource.key.ResourceEntry; import org.infinity.util.DynamicArray; +import org.infinity.util.Logger; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public class MosV2Decoder extends MosDecoder { private static final int HEADER_SIZE = 16; // size of the MOS header diff --git a/src/org/infinity/resource/graphics/PltResource.java b/src/org/infinity/resource/graphics/PltResource.java index eeef19c27..833876f88 100644 --- a/src/org/infinity/resource/graphics/PltResource.java +++ b/src/org/infinity/resource/graphics/PltResource.java @@ -61,10 +61,10 @@ import org.infinity.resource.Writeable; import org.infinity.resource.cre.CreResource; import org.infinity.resource.key.ResourceEntry; +import org.infinity.util.Logger; import org.infinity.util.Table2da; import org.infinity.util.Table2daCache; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; import tv.porst.jhexview.DataChangedEvent; import tv.porst.jhexview.IDataChangedListener; diff --git a/src/org/infinity/resource/graphics/PseudoBamDecoder.java b/src/org/infinity/resource/graphics/PseudoBamDecoder.java index ead2c0d62..b2badc75b 100644 --- a/src/org/infinity/resource/graphics/PseudoBamDecoder.java +++ b/src/org/infinity/resource/graphics/PseudoBamDecoder.java @@ -31,10 +31,10 @@ import org.infinity.resource.Profile; import org.infinity.util.BinPack2D; import org.infinity.util.DynamicArray; +import org.infinity.util.Logger; import org.infinity.util.io.FileManager; import org.infinity.util.io.StreamUtils; import org.infinity.util.tuples.Couple; -import org.tinylog.Logger; /** * A decoder that takes individual images as input and simulates a BAM structure. Furthermore, this class provides diff --git a/src/org/infinity/resource/graphics/PvrDecoder.java b/src/org/infinity/resource/graphics/PvrDecoder.java index aa4062b6e..820e99fc0 100644 --- a/src/org/infinity/resource/graphics/PvrDecoder.java +++ b/src/org/infinity/resource/graphics/PvrDecoder.java @@ -17,9 +17,9 @@ import org.infinity.resource.key.FileResourceEntry; import org.infinity.resource.key.ResourceEntry; import org.infinity.util.DynamicArray; +import org.infinity.util.Logger; import org.infinity.util.io.FileManager; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * Decodes a PVR(Z) file. Note: Supports only the minimal set of PVR-specific features required to decode the BGEE's diff --git a/src/org/infinity/resource/graphics/PvrzResource.java b/src/org/infinity/resource/graphics/PvrzResource.java index 5dd0fd9c6..f16cad5a1 100644 --- a/src/org/infinity/resource/graphics/PvrzResource.java +++ b/src/org/infinity/resource/graphics/PvrzResource.java @@ -36,8 +36,8 @@ import org.infinity.resource.ViewableContainer; import org.infinity.resource.key.ResourceEntry; import org.infinity.search.ReferenceSearcher; +import org.infinity.util.Logger; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * This resource is used to store graphics data that can be directly utilised by the video hardware. diff --git a/src/org/infinity/resource/graphics/TisConvert.java b/src/org/infinity/resource/graphics/TisConvert.java index b87e0833d..78b2b24fc 100644 --- a/src/org/infinity/resource/graphics/TisConvert.java +++ b/src/org/infinity/resource/graphics/TisConvert.java @@ -55,10 +55,10 @@ import org.infinity.util.BinPack2D; import org.infinity.util.DynamicArray; import org.infinity.util.IntegerHashMap; +import org.infinity.util.Logger; import org.infinity.util.io.FileEx; import org.infinity.util.io.StreamUtils; import org.infinity.util.tuples.Couple; -import org.tinylog.Logger; /** * This utility class provides methods for converting tileset (TIS) resources. diff --git a/src/org/infinity/resource/graphics/TisDecoder.java b/src/org/infinity/resource/graphics/TisDecoder.java index 6aa29e0fb..a08d179b5 100644 --- a/src/org/infinity/resource/graphics/TisDecoder.java +++ b/src/org/infinity/resource/graphics/TisDecoder.java @@ -10,8 +10,8 @@ import java.util.Objects; import org.infinity.resource.key.ResourceEntry; +import org.infinity.util.Logger; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * Common base class for handling TIS resources. diff --git a/src/org/infinity/resource/graphics/TisResource.java b/src/org/infinity/resource/graphics/TisResource.java index 2b75c08c5..c81a97ca7 100644 --- a/src/org/infinity/resource/graphics/TisResource.java +++ b/src/org/infinity/resource/graphics/TisResource.java @@ -108,9 +108,9 @@ import org.infinity.search.ReferenceSearcher; import org.infinity.util.DataString; import org.infinity.util.DebugTimer; +import org.infinity.util.Logger; import org.infinity.util.io.FileEx; import org.infinity.util.tuples.Couple; -import org.tinylog.Logger; /** * This resource describes a tileset. There are currently two variants available: diff --git a/src/org/infinity/resource/graphics/TisV1Decoder.java b/src/org/infinity/resource/graphics/TisV1Decoder.java index cc3b9e583..747654372 100644 --- a/src/org/infinity/resource/graphics/TisV1Decoder.java +++ b/src/org/infinity/resource/graphics/TisV1Decoder.java @@ -14,7 +14,7 @@ import java.util.Objects; import org.infinity.resource.key.ResourceEntry; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Handles legacy TIS resources (using palettized tiles). diff --git a/src/org/infinity/resource/graphics/TisV2Decoder.java b/src/org/infinity/resource/graphics/TisV2Decoder.java index 3179ff213..d05dc70ab 100644 --- a/src/org/infinity/resource/graphics/TisV2Decoder.java +++ b/src/org/infinity/resource/graphics/TisV2Decoder.java @@ -15,7 +15,7 @@ import org.infinity.resource.ResourceFactory; import org.infinity.resource.key.ResourceEntry; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Handles new PVRZ-based TIS resources. diff --git a/src/org/infinity/resource/itm/ItmResource.java b/src/org/infinity/resource/itm/ItmResource.java index 0c9210614..dd75ec4f9 100644 --- a/src/org/infinity/resource/itm/ItmResource.java +++ b/src/org/infinity/resource/itm/ItmResource.java @@ -48,12 +48,12 @@ import org.infinity.util.IdsMap; import org.infinity.util.IdsMapCache; import org.infinity.util.IdsMapEntry; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.StringTable; import org.infinity.util.Table2da; import org.infinity.util.Table2daCache; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * This resource describes an "item". Items include weapons, armor, books, scrolls, rings and more. Items can have diff --git a/src/org/infinity/resource/itm/ViewerAbility.java b/src/org/infinity/resource/itm/ViewerAbility.java index 52509f118..b27265a99 100644 --- a/src/org/infinity/resource/itm/ViewerAbility.java +++ b/src/org/infinity/resource/itm/ViewerAbility.java @@ -22,18 +22,17 @@ import org.infinity.resource.AbstractAbility; import org.infinity.resource.Effect; import org.infinity.resource.StructEntry; +import org.infinity.util.Logger; import org.infinity.util.StringTable; import org.infinity.util.Table2da; import org.infinity.util.Table2daCache; -import org.tinylog.Logger; final class ViewerAbility extends JPanel { ViewerAbility(Ability ability) { JPanel fieldPanel = makeFieldPanel(ability); JPanel effectsPanel = ViewerUtil.makeListPanel("Effects", ability, Effect.class, EffectType.EFFECT_TYPE); JComponent iconPanel = ViewerUtil.makeBamPanel((ResourceRef) ability.getAttribute(AbstractAbility.ABILITY_ICON), 0); - JComponent boxPanel1 = ViewerUtil.makeCheckPanel((Flag) ability.getAttribute(AbstractAbility.ABILITY_TYPE_FLAGS), - 1); + JComponent boxPanel1 = ViewerUtil.makeCheckPanel((Flag) ability.getAttribute(AbstractAbility.ABILITY_TYPE_FLAGS), 1); JPanel flagPanel = ViewerUtil.makeCheckPanel((Flag) ability.getAttribute(Ability.ITM_ABIL_FLAGS), 1); JPanel boxPanel2 = new JPanel(new GridLayout(0, 1, 0, 3)); diff --git a/src/org/infinity/resource/key/BIFFEntry.java b/src/org/infinity/resource/key/BIFFEntry.java index 977ba2f2a..e2a8ba1a3 100644 --- a/src/org/infinity/resource/key/BIFFEntry.java +++ b/src/org/infinity/resource/key/BIFFEntry.java @@ -16,10 +16,10 @@ import org.infinity.resource.Profile; import org.infinity.resource.Writeable; +import org.infinity.util.Logger; import org.infinity.util.io.FileEx; import org.infinity.util.io.FileManager; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * Provides information about the location of resource data within BIFF archives. diff --git a/src/org/infinity/resource/key/BIFFReader.java b/src/org/infinity/resource/key/BIFFReader.java index 9efe2c632..79fc51c01 100644 --- a/src/org/infinity/resource/key/BIFFReader.java +++ b/src/org/infinity/resource/key/BIFFReader.java @@ -16,9 +16,9 @@ import org.infinity.NearInfinity; import org.infinity.gui.WindowBlocker; +import org.infinity.util.Logger; import org.infinity.util.io.ByteBufferInputStream; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * Provides read operations for uncompressed BIFF V1 archives. diff --git a/src/org/infinity/resource/key/BIFFResourceEntry.java b/src/org/infinity/resource/key/BIFFResourceEntry.java index f325d6c12..d4d3da189 100644 --- a/src/org/infinity/resource/key/BIFFResourceEntry.java +++ b/src/org/infinity/resource/key/BIFFResourceEntry.java @@ -20,10 +20,10 @@ import org.infinity.resource.Profile; import org.infinity.resource.ResourceFactory; import org.infinity.resource.Writeable; +import org.infinity.util.Logger; import org.infinity.util.io.FileEx; import org.infinity.util.io.FileManager; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public final class BIFFResourceEntry extends ResourceEntry implements Writeable { /** Full path to KEY file containing BIFF entry. */ diff --git a/src/org/infinity/resource/key/BIFFWriter.java b/src/org/infinity/resource/key/BIFFWriter.java index 5954dc21e..07a137465 100644 --- a/src/org/infinity/resource/key/BIFFWriter.java +++ b/src/org/infinity/resource/key/BIFFWriter.java @@ -20,10 +20,10 @@ import org.infinity.resource.Profile; import org.infinity.resource.ResourceFactory; +import org.infinity.util.Logger; import org.infinity.util.io.FileEx; import org.infinity.util.io.FileManager; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public final class BIFFWriter { private final BIFFEntry bifEntry; diff --git a/src/org/infinity/resource/key/FileResourceEntry.java b/src/org/infinity/resource/key/FileResourceEntry.java index 2d032af3e..632b850c6 100644 --- a/src/org/infinity/resource/key/FileResourceEntry.java +++ b/src/org/infinity/resource/key/FileResourceEntry.java @@ -21,9 +21,9 @@ import org.infinity.gui.menu.OverrideMode; import org.infinity.resource.Profile; import org.infinity.resource.ResourceFactory; +import org.infinity.util.Logger; import org.infinity.util.io.ByteBufferInputStream; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public final class FileResourceEntry extends ResourceEntry { private final boolean override; diff --git a/src/org/infinity/resource/key/Keyfile.java b/src/org/infinity/resource/key/Keyfile.java index 85a495852..977da67bc 100644 --- a/src/org/infinity/resource/key/Keyfile.java +++ b/src/org/infinity/resource/key/Keyfile.java @@ -27,10 +27,10 @@ import org.infinity.icon.Icons; import org.infinity.resource.ResourceFactory; import org.infinity.util.IntegerHashMap; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.io.FileEx; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public class Keyfile { public static final ImageIcon ICON_STRUCT = Icons.ICON_ROW_INSERT_AFTER_16.getIcon(); diff --git a/src/org/infinity/resource/key/ResourceEntry.java b/src/org/infinity/resource/key/ResourceEntry.java index 195a0bd55..dddac92f7 100644 --- a/src/org/infinity/resource/key/ResourceEntry.java +++ b/src/org/infinity/resource/key/ResourceEntry.java @@ -32,9 +32,9 @@ import org.infinity.resource.sto.StoResource; import org.infinity.resource.text.PlainTextResource; import org.infinity.search.SearchOptions; +import org.infinity.util.Logger; import org.infinity.util.io.FileEx; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public abstract class ResourceEntry implements Comparable { // list of file extensions not shown in the resource tree diff --git a/src/org/infinity/resource/key/ResourceTreeModel.java b/src/org/infinity/resource/key/ResourceTreeModel.java index 16af4a181..ddb515c2f 100644 --- a/src/org/infinity/resource/key/ResourceTreeModel.java +++ b/src/org/infinity/resource/key/ResourceTreeModel.java @@ -23,9 +23,9 @@ import javax.swing.tree.TreeModel; import javax.swing.tree.TreePath; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.io.FileEx; -import org.tinylog.Logger; public final class ResourceTreeModel implements TreeModel { private final List treeModelListeners = new ArrayList<>(); diff --git a/src/org/infinity/resource/mus/MusResource.java b/src/org/infinity/resource/mus/MusResource.java index c7326cedd..0d4c4cfc1 100644 --- a/src/org/infinity/resource/mus/MusResource.java +++ b/src/org/infinity/resource/mus/MusResource.java @@ -46,9 +46,9 @@ import org.infinity.resource.key.ResourceEntry; import org.infinity.search.SongReferenceSearcher; import org.infinity.search.TextResourceSearcher; +import org.infinity.util.Logger; import org.infinity.util.Table2da; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * This resource acts as a playlist for ACM files, determining loops and "interrupt state" effects. An "interrupt state diff --git a/src/org/infinity/resource/mus/Viewer.java b/src/org/infinity/resource/mus/Viewer.java index 98e739228..8ffe83718 100644 --- a/src/org/infinity/resource/mus/Viewer.java +++ b/src/org/infinity/resource/mus/Viewer.java @@ -30,9 +30,9 @@ import org.infinity.gui.menu.BrowserMenuBar; import org.infinity.icon.Icons; import org.infinity.resource.sound.AudioPlayer; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.SimpleListModel; -import org.tinylog.Logger; public class Viewer extends JPanel implements Runnable, ActionListener { /** Provides quick access to the "play" and "pause" image icon. */ diff --git a/src/org/infinity/resource/other/EffResource.java b/src/org/infinity/resource/other/EffResource.java index ff0d62844..c030263c3 100644 --- a/src/org/infinity/resource/other/EffResource.java +++ b/src/org/infinity/resource/other/EffResource.java @@ -22,7 +22,7 @@ import org.infinity.resource.StructEntry; import org.infinity.resource.key.ResourceEntry; import org.infinity.search.SearchOptions; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * This resource describes an effect (opcode) and its parameters. The resource of version 1 is only ever found embedded diff --git a/src/org/infinity/resource/other/TtfResource.java b/src/org/infinity/resource/other/TtfResource.java index 130425d11..4f2a6a3eb 100644 --- a/src/org/infinity/resource/other/TtfResource.java +++ b/src/org/infinity/resource/other/TtfResource.java @@ -39,7 +39,7 @@ import org.infinity.resource.ResourceFactory; import org.infinity.resource.ViewableContainer; import org.infinity.resource.key.ResourceEntry; -import org.tinylog.Logger; +import org.infinity.util.Logger; public class TtfResource implements Resource, DocumentListener, ActionListener { private static final ButtonPanel.Control PROPERTIES = ButtonPanel.Control.CUSTOM_1; diff --git a/src/org/infinity/resource/other/UnknownResource.java b/src/org/infinity/resource/other/UnknownResource.java index a8bf447d1..015721c06 100644 --- a/src/org/infinity/resource/other/UnknownResource.java +++ b/src/org/infinity/resource/other/UnknownResource.java @@ -44,9 +44,9 @@ import org.infinity.resource.Writeable; import org.infinity.resource.key.FileResourceEntry; import org.infinity.resource.key.ResourceEntry; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; import tv.porst.jhexview.DataChangedEvent; import tv.porst.jhexview.IDataChangedListener; diff --git a/src/org/infinity/resource/other/VvcResource.java b/src/org/infinity/resource/other/VvcResource.java index 1799f5e5a..19ef1a8fd 100644 --- a/src/org/infinity/resource/other/VvcResource.java +++ b/src/org/infinity/resource/other/VvcResource.java @@ -25,7 +25,7 @@ import org.infinity.resource.key.ResourceEntry; import org.infinity.resource.sound.SoundResource; import org.infinity.search.SearchOptions; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * This resource describes visual "spell casting" effects ({@link BamResource BAM} files) with optional sounds diff --git a/src/org/infinity/resource/pro/ProResource.java b/src/org/infinity/resource/pro/ProResource.java index 1d46d3e7c..c6cb01296 100644 --- a/src/org/infinity/resource/pro/ProResource.java +++ b/src/org/infinity/resource/pro/ProResource.java @@ -38,7 +38,7 @@ import org.infinity.resource.StructEntry; import org.infinity.resource.key.ResourceEntry; import org.infinity.search.SearchOptions; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * This resource describes projectiles, and the files are referenced spells and projectile weapons. Projectile files can diff --git a/src/org/infinity/resource/sav/IOHandler.java b/src/org/infinity/resource/sav/IOHandler.java index 2257a4b34..a9af73b28 100644 --- a/src/org/infinity/resource/sav/IOHandler.java +++ b/src/org/infinity/resource/sav/IOHandler.java @@ -21,9 +21,9 @@ import org.infinity.resource.key.FileResourceEntry; import org.infinity.resource.key.ResourceEntry; import org.infinity.util.FileDeletionHook; +import org.infinity.util.Logger; import org.infinity.util.io.FileEx; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public final class IOHandler implements Writeable { private final ResourceEntry entry; diff --git a/src/org/infinity/resource/sav/SavResource.java b/src/org/infinity/resource/sav/SavResource.java index 79f2966f0..5756c524e 100644 --- a/src/org/infinity/resource/sav/SavResource.java +++ b/src/org/infinity/resource/sav/SavResource.java @@ -49,9 +49,9 @@ import org.infinity.resource.Writeable; import org.infinity.resource.key.FileResourceEntry; import org.infinity.resource.key.ResourceEntry; +import org.infinity.util.Logger; import org.infinity.util.SimpleListModel; import org.infinity.util.io.FileEx; -import org.tinylog.Logger; /** * This resource acts as a standalone compressed archive. The file is zlib compressed, and allows incremental updates to diff --git a/src/org/infinity/resource/sav/SavResourceEntry.java b/src/org/infinity/resource/sav/SavResourceEntry.java index 1e7975cf4..5d4e3d4ca 100644 --- a/src/org/infinity/resource/sav/SavResourceEntry.java +++ b/src/org/infinity/resource/sav/SavResourceEntry.java @@ -17,10 +17,10 @@ import org.infinity.resource.Writeable; import org.infinity.resource.key.ResourceEntry; import org.infinity.resource.key.ResourceTreeFolder; +import org.infinity.util.Logger; import org.infinity.util.io.ByteBufferInputStream; import org.infinity.util.io.ByteBufferOutputStream; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * Specialized ResourceEntry class for compressed entries in SAV resources. diff --git a/src/org/infinity/resource/sound/AudioFactory.java b/src/org/infinity/resource/sound/AudioFactory.java index b1672d8e4..6b3a558c7 100644 --- a/src/org/infinity/resource/sound/AudioFactory.java +++ b/src/org/infinity/resource/sound/AudioFactory.java @@ -7,8 +7,8 @@ import org.infinity.resource.key.ResourceEntry; import org.infinity.resource.sound.AudioBuffer.AudioOverride; import org.infinity.util.DynamicArray; +import org.infinity.util.Logger; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public class AudioFactory { // supported audio formats diff --git a/src/org/infinity/resource/sound/AudioPlayer.java b/src/org/infinity/resource/sound/AudioPlayer.java index 4998791e3..f8b2846ea 100644 --- a/src/org/infinity/resource/sound/AudioPlayer.java +++ b/src/org/infinity/resource/sound/AudioPlayer.java @@ -4,8 +4,6 @@ package org.infinity.resource.sound; -import org.tinylog.Logger; - import java.io.ByteArrayInputStream; import javax.sound.sampled.AudioFormat; @@ -15,6 +13,8 @@ import javax.sound.sampled.SourceDataLine; import javax.sound.sampled.UnsupportedAudioFileException; +import org.infinity.util.Logger; + public class AudioPlayer { private final byte[] buffer = new byte[8196]; diff --git a/src/org/infinity/resource/sound/OggBuffer.java b/src/org/infinity/resource/sound/OggBuffer.java index bebe960a9..dcd8adef5 100644 --- a/src/org/infinity/resource/sound/OggBuffer.java +++ b/src/org/infinity/resource/sound/OggBuffer.java @@ -8,7 +8,7 @@ import java.io.ByteArrayOutputStream; import org.infinity.resource.key.ResourceEntry; -import org.tinylog.Logger; +import org.infinity.util.Logger; import com.jcraft.jogg.Packet; import com.jcraft.jogg.Page; diff --git a/src/org/infinity/resource/sound/SoundResource.java b/src/org/infinity/resource/sound/SoundResource.java index 5e303dfa6..05919abc2 100644 --- a/src/org/infinity/resource/sound/SoundResource.java +++ b/src/org/infinity/resource/sound/SoundResource.java @@ -42,8 +42,8 @@ import org.infinity.resource.ViewableContainer; import org.infinity.resource.key.ResourceEntry; import org.infinity.search.WavReferenceSearcher; +import org.infinity.util.Logger; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * Handles all kinds of supported single track audio files. diff --git a/src/org/infinity/resource/spl/SplResource.java b/src/org/infinity/resource/spl/SplResource.java index 4ea459a72..3ae933759 100644 --- a/src/org/infinity/resource/spl/SplResource.java +++ b/src/org/infinity/resource/spl/SplResource.java @@ -47,9 +47,9 @@ import org.infinity.resource.itm.ItmResource; import org.infinity.resource.key.ResourceEntry; import org.infinity.search.SearchOptions; +import org.infinity.util.Logger; import org.infinity.util.StringTable; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * This resource describes a "spell". Spells include mage spells, priest spells, innate abilities, special abilities and diff --git a/src/org/infinity/resource/spl/Viewer.java b/src/org/infinity/resource/spl/Viewer.java index 5233bd841..a2a5cc551 100644 --- a/src/org/infinity/resource/spl/Viewer.java +++ b/src/org/infinity/resource/spl/Viewer.java @@ -28,7 +28,7 @@ import org.infinity.util.IdsMap; import org.infinity.util.IdsMapCache; import org.infinity.util.IdsMapEntry; -import org.tinylog.Logger; +import org.infinity.util.Logger; public final class Viewer extends JPanel { private static final HashMap SPELL_PREFIX_MAP = new HashMap<>(); diff --git a/src/org/infinity/resource/sto/StoResource.java b/src/org/infinity/resource/sto/StoResource.java index cc58bebd3..2c1ba64ec 100644 --- a/src/org/infinity/resource/sto/StoResource.java +++ b/src/org/infinity/resource/sto/StoResource.java @@ -35,9 +35,9 @@ import org.infinity.resource.StructEntry; import org.infinity.resource.key.ResourceEntry; import org.infinity.search.SearchOptions; +import org.infinity.util.Logger; import org.infinity.util.StringTable; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * These resource contains a description of the types of items and services available for sale in a given store, inn, diff --git a/src/org/infinity/resource/text/PlainTextResource.java b/src/org/infinity/resource/text/PlainTextResource.java index d319490b1..1a4461325 100644 --- a/src/org/infinity/resource/text/PlainTextResource.java +++ b/src/org/infinity/resource/text/PlainTextResource.java @@ -16,7 +16,11 @@ import java.io.OutputStreamWriter; import java.nio.ByteBuffer; import java.nio.charset.Charset; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Locale; +import java.util.StringTokenizer; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -48,10 +52,10 @@ import org.infinity.util.IdsMap; import org.infinity.util.IdsMapCache; import org.infinity.util.IdsMapEntry; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.StaticSimpleXorDecryptor; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public class PlainTextResource implements TextResource, Writeable, ActionListener, ItemListener, DocumentListener, Closeable, Referenceable { diff --git a/src/org/infinity/resource/text/modes/BCSFoldParser.java b/src/org/infinity/resource/text/modes/BCSFoldParser.java index 618463f00..78382d9d2 100644 --- a/src/org/infinity/resource/text/modes/BCSFoldParser.java +++ b/src/org/infinity/resource/text/modes/BCSFoldParser.java @@ -15,7 +15,7 @@ import org.fife.ui.rsyntaxtextarea.folding.Fold; import org.fife.ui.rsyntaxtextarea.folding.FoldParser; import org.fife.ui.rsyntaxtextarea.folding.FoldType; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * A fold parser for BCS scripts. It supports folding of multiline comments and IF/END blocks. diff --git a/src/org/infinity/resource/text/modes/BCSTokenMaker.java b/src/org/infinity/resource/text/modes/BCSTokenMaker.java index 5ca48e9c8..e938e61f7 100644 --- a/src/org/infinity/resource/text/modes/BCSTokenMaker.java +++ b/src/org/infinity/resource/text/modes/BCSTokenMaker.java @@ -20,7 +20,7 @@ import org.infinity.util.IdsMap; import org.infinity.util.IdsMapCache; import org.infinity.util.IdsMapEntry; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * A token maker that turns text into a linked list of {@code Token}s for syntax highlighting Infinity Engine BCS diff --git a/src/org/infinity/resource/text/modes/GLSLTokenMaker.java b/src/org/infinity/resource/text/modes/GLSLTokenMaker.java index 1e1712644..e289840f4 100644 --- a/src/org/infinity/resource/text/modes/GLSLTokenMaker.java +++ b/src/org/infinity/resource/text/modes/GLSLTokenMaker.java @@ -24,9 +24,8 @@ import org.fife.ui.rsyntaxtextarea.AbstractJFlexCTokenMaker; import org.fife.ui.rsyntaxtextarea.Token; import org.fife.ui.rsyntaxtextarea.TokenImpl; +import org.infinity.util.Logger; import org.infinity.util.Misc; -import org.tinylog.Logger; - /** * Scanner for the GLSL programming language (based on scanner for C). diff --git a/src/org/infinity/resource/text/modes/INITokenMaker.java b/src/org/infinity/resource/text/modes/INITokenMaker.java index f04911dd2..d73437e47 100644 --- a/src/org/infinity/resource/text/modes/INITokenMaker.java +++ b/src/org/infinity/resource/text/modes/INITokenMaker.java @@ -10,7 +10,7 @@ import org.fife.ui.rsyntaxtextarea.Token; import org.fife.ui.rsyntaxtextarea.TokenMap; import org.fife.ui.rsyntaxtextarea.TokenTypes; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * A token maker that turns text into a linked list of {@code Token}s for syntax highlighting Infinity Engine INI diff --git a/src/org/infinity/resource/text/modes/MenuTokenMaker.java b/src/org/infinity/resource/text/modes/MenuTokenMaker.java index 8f43a1862..671029804 100644 --- a/src/org/infinity/resource/text/modes/MenuTokenMaker.java +++ b/src/org/infinity/resource/text/modes/MenuTokenMaker.java @@ -23,8 +23,7 @@ import org.fife.ui.rsyntaxtextarea.AbstractJFlexTokenMaker; import org.fife.ui.rsyntaxtextarea.Token; import org.fife.ui.rsyntaxtextarea.TokenImpl; -import org.tinylog.Logger; - +import org.infinity.util.Logger; /** * Scanner for the Menu scripting language extension.

diff --git a/src/org/infinity/resource/text/modes/TLKTokenMaker.java b/src/org/infinity/resource/text/modes/TLKTokenMaker.java index 00ac2ad82..fa94607a4 100644 --- a/src/org/infinity/resource/text/modes/TLKTokenMaker.java +++ b/src/org/infinity/resource/text/modes/TLKTokenMaker.java @@ -13,7 +13,7 @@ import org.fife.ui.rsyntaxtextarea.TokenMap; import org.fife.ui.rsyntaxtextarea.TokenTypes; import org.infinity.resource.Profile; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * A token maker that turns text into a linked list of {@link Token}s for syntax highlighting Infinity Engine text diff --git a/src/org/infinity/resource/text/modes/WeiDULogTokenMaker.java b/src/org/infinity/resource/text/modes/WeiDULogTokenMaker.java index 2e5ed9260..f527b600d 100644 --- a/src/org/infinity/resource/text/modes/WeiDULogTokenMaker.java +++ b/src/org/infinity/resource/text/modes/WeiDULogTokenMaker.java @@ -10,7 +10,7 @@ import org.fife.ui.rsyntaxtextarea.Token; import org.fife.ui.rsyntaxtextarea.TokenMap; import org.fife.ui.rsyntaxtextarea.TokenTypes; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * A token maker that turns text into a linked list of {@link Token}s for syntax highlighting WeiDU.log content. diff --git a/src/org/infinity/resource/to/TohResource.java b/src/org/infinity/resource/to/TohResource.java index b20ba65ec..d8ce327d9 100644 --- a/src/org/infinity/resource/to/TohResource.java +++ b/src/org/infinity/resource/to/TohResource.java @@ -24,8 +24,8 @@ import org.infinity.resource.StructEntry; import org.infinity.resource.key.ResourceEntry; import org.infinity.resource.sav.SavResource; +import org.infinity.util.Logger; import org.infinity.util.StringTable; -import org.tinylog.Logger; /** * This resource serves a similar purpose (and has a similar structure to) {@link StringTable TLK} files. The resource diff --git a/src/org/infinity/resource/to/TotResource.java b/src/org/infinity/resource/to/TotResource.java index d1a52c26d..f084436ab 100644 --- a/src/org/infinity/resource/to/TotResource.java +++ b/src/org/infinity/resource/to/TotResource.java @@ -17,9 +17,9 @@ import org.infinity.resource.key.FileResourceEntry; import org.infinity.resource.key.ResourceEntry; import org.infinity.resource.sav.SavResource; +import org.infinity.util.Logger; import org.infinity.util.StringTable; import org.infinity.util.io.FileManager; -import org.tinylog.Logger; /** * This resource serves a similar purpose (and has a similar structure to) {@link StringTable TLK} files. The files can diff --git a/src/org/infinity/resource/vef/VefType.java b/src/org/infinity/resource/vef/VefType.java index ec105211f..02cb3773c 100644 --- a/src/org/infinity/resource/vef/VefType.java +++ b/src/org/infinity/resource/vef/VefType.java @@ -14,7 +14,7 @@ import org.infinity.datatype.TextString; import org.infinity.resource.AbstractStruct; import org.infinity.resource.StructEntry; -import org.tinylog.Logger; +import org.infinity.util.Logger; public final class VefType extends Bitmap { // VEF/VefType-specific field labels diff --git a/src/org/infinity/resource/video/AudioQueue.java b/src/org/infinity/resource/video/AudioQueue.java index 8fe887f03..8ab6626be 100644 --- a/src/org/infinity/resource/video/AudioQueue.java +++ b/src/org/infinity/resource/video/AudioQueue.java @@ -4,11 +4,13 @@ package org.infinity.resource.video; -import org.tinylog.Logger; + import java.util.ArrayDeque; import java.util.Deque; +import org.infinity.util.Logger; + /** * Represents a container for audio chunks returned by the MveDecoder. */ diff --git a/src/org/infinity/resource/video/MveDecoder.java b/src/org/infinity/resource/video/MveDecoder.java index 7e4fd0b12..6d88be27c 100644 --- a/src/org/infinity/resource/video/MveDecoder.java +++ b/src/org/infinity/resource/video/MveDecoder.java @@ -15,8 +15,8 @@ import javax.sound.sampled.AudioFormat; import org.infinity.resource.key.ResourceEntry; +import org.infinity.util.Logger; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * Decodes a MVE video resource. diff --git a/src/org/infinity/resource/video/MvePlayer.java b/src/org/infinity/resource/video/MvePlayer.java index d8d46d1c8..749291118 100644 --- a/src/org/infinity/resource/video/MvePlayer.java +++ b/src/org/infinity/resource/video/MvePlayer.java @@ -8,7 +8,7 @@ import javax.sound.sampled.AudioSystem; import javax.sound.sampled.SourceDataLine; -import org.tinylog.Logger; +import org.infinity.util.Logger; public class MvePlayer { private final AudioQueue audioQueue; diff --git a/src/org/infinity/resource/video/MveResource.java b/src/org/infinity/resource/video/MveResource.java index 69da4dd5f..a7e0ff659 100644 --- a/src/org/infinity/resource/video/MveResource.java +++ b/src/org/infinity/resource/video/MveResource.java @@ -49,6 +49,7 @@ import org.infinity.resource.key.BIFFResourceEntry; import org.infinity.resource.key.ResourceEntry; import org.infinity.search.ReferenceSearcher; +import org.infinity.util.Logger; import org.infinity.util.io.FileEx; import org.monte.media.AudioFormatKeys; import org.monte.media.Format; @@ -56,7 +57,6 @@ import org.monte.media.VideoFormatKeys; import org.monte.media.avi.AVIWriter; import org.monte.media.math.Rational; -import org.tinylog.Logger; /** * This resource describes the movies played during the game. Movies can only be played by the engine when they are diff --git a/src/org/infinity/resource/video/MveVideoDecoder.java b/src/org/infinity/resource/video/MveVideoDecoder.java index b1c57be07..9a637e125 100644 --- a/src/org/infinity/resource/video/MveVideoDecoder.java +++ b/src/org/infinity/resource/video/MveVideoDecoder.java @@ -13,8 +13,8 @@ import org.infinity.resource.graphics.ColorConvert; import org.infinity.resource.video.MveDecoder.MveInfo; import org.infinity.resource.video.MveDecoder.MveSegment; +import org.infinity.util.Logger; import org.infinity.util.Misc; -import org.tinylog.Logger; /** * Decodes a single 8x8 pixel block of video data. (Internally used by MveDecoder) diff --git a/src/org/infinity/resource/video/WbmResource.java b/src/org/infinity/resource/video/WbmResource.java index a59818dd5..96920edc7 100644 --- a/src/org/infinity/resource/video/WbmResource.java +++ b/src/org/infinity/resource/video/WbmResource.java @@ -36,10 +36,10 @@ import org.infinity.search.ReferenceSearcher; import org.infinity.util.FileDeletionHook; import org.infinity.util.LauncherUtils; +import org.infinity.util.Logger; import org.infinity.util.io.FileEx; import org.infinity.util.io.FileManager; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public final class WbmResource implements Resource, Closeable, Referenceable, ActionListener { private final ResourceEntry entry; diff --git a/src/org/infinity/resource/wmp/ViewerMap.java b/src/org/infinity/resource/wmp/ViewerMap.java index 1507e0b5d..21ac5d5bf 100644 --- a/src/org/infinity/resource/wmp/ViewerMap.java +++ b/src/org/infinity/resource/wmp/ViewerMap.java @@ -66,10 +66,10 @@ import org.infinity.resource.graphics.ColorConvert; import org.infinity.resource.graphics.MosDecoder; import org.infinity.resource.key.ResourceEntry; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.StringTable; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public class ViewerMap extends JPanel { /** Needed to determine map edges to travel from/to. */ diff --git a/src/org/infinity/search/AbstractSearcher.java b/src/org/infinity/search/AbstractSearcher.java index e6f8cb07a..b77ee584c 100644 --- a/src/org/infinity/search/AbstractSearcher.java +++ b/src/org/infinity/search/AbstractSearcher.java @@ -14,9 +14,9 @@ import org.infinity.NearInfinity; import org.infinity.resource.key.ResourceEntry; import org.infinity.util.DebugTimer; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.Threading; -import org.tinylog.Logger; /** * Utility class for performing searching of resources in several threads with ability to cancel search. diff --git a/src/org/infinity/search/DialogItemRefSearcher.java b/src/org/infinity/search/DialogItemRefSearcher.java index 255c75780..f02e4736d 100644 --- a/src/org/infinity/search/DialogItemRefSearcher.java +++ b/src/org/infinity/search/DialogItemRefSearcher.java @@ -19,7 +19,7 @@ import org.infinity.resource.dlg.StateTrigger; import org.infinity.resource.dlg.Transition; import org.infinity.util.DebugTimer; -import org.tinylog.Logger; +import org.infinity.util.Logger; public class DialogItemRefSearcher implements Runnable { private final DlgResource dlg; diff --git a/src/org/infinity/search/DialogSearcher.java b/src/org/infinity/search/DialogSearcher.java index 7a5242076..af22a4d22 100644 --- a/src/org/infinity/search/DialogSearcher.java +++ b/src/org/infinity/search/DialogSearcher.java @@ -41,7 +41,7 @@ import org.infinity.resource.dlg.AbstractCode; import org.infinity.resource.dlg.Action; import org.infinity.resource.key.ResourceEntry; -import org.tinylog.Logger; +import org.infinity.util.Logger; public final class DialogSearcher extends AbstractSearcher implements Runnable, ActionListener { private final ChildFrame inputFrame; diff --git a/src/org/infinity/search/ReferenceSearcher.java b/src/org/infinity/search/ReferenceSearcher.java index 8a2bc842b..c8955b370 100644 --- a/src/org/infinity/search/ReferenceSearcher.java +++ b/src/org/infinity/search/ReferenceSearcher.java @@ -34,7 +34,7 @@ import org.infinity.resource.other.EffResource; import org.infinity.resource.sav.SavResource; import org.infinity.resource.text.PlainTextResource; -import org.tinylog.Logger; +import org.infinity.util.Logger; public final class ReferenceSearcher extends AbstractReferenceSearcher { /** Optional alternate name to search for. */ diff --git a/src/org/infinity/search/SearchFrame.java b/src/org/infinity/search/SearchFrame.java index 44c4f9fd7..b12cd9edd 100644 --- a/src/org/infinity/search/SearchFrame.java +++ b/src/org/infinity/search/SearchFrame.java @@ -49,8 +49,8 @@ import org.infinity.resource.Viewable; import org.infinity.resource.bcs.BcsResource; import org.infinity.resource.key.ResourceEntry; +import org.infinity.util.Logger; import org.infinity.util.Misc; -import org.tinylog.Logger; public final class SearchFrame extends ChildFrame implements ActionListener, ListSelectionListener, Runnable { // private static final SearchFrame SEARCH_FRAME = null; diff --git a/src/org/infinity/search/SearchMaster.java b/src/org/infinity/search/SearchMaster.java index 84785b391..f9da30e30 100644 --- a/src/org/infinity/search/SearchMaster.java +++ b/src/org/infinity/search/SearchMaster.java @@ -31,7 +31,7 @@ import org.infinity.gui.ChildFrame; import org.infinity.gui.WindowBlocker; import org.infinity.icon.Icons; -import org.tinylog.Logger; +import org.infinity.util.Logger; public final class SearchMaster extends JPanel implements Runnable, ActionListener { private final JButton bnext = new JButton("Find Next", Icons.ICON_FIND_AGAIN_16.getIcon()); diff --git a/src/org/infinity/search/SearchOptions.java b/src/org/infinity/search/SearchOptions.java index 3cee1f2dd..3f3fafe5c 100644 --- a/src/org/infinity/search/SearchOptions.java +++ b/src/org/infinity/search/SearchOptions.java @@ -19,9 +19,9 @@ import org.infinity.resource.AbstractStruct; import org.infinity.resource.ResourceFactory; import org.infinity.resource.StructEntry; +import org.infinity.util.Logger; import org.infinity.util.io.StreamUtils; import org.infinity.util.tuples.Couple; -import org.tinylog.Logger; /** * Stores a list of search options specified in SearchResource (Extended search) for use in the resource-specific search diff --git a/src/org/infinity/search/SearchResource.java b/src/org/infinity/search/SearchResource.java index b62ce991a..88a26a1b3 100644 --- a/src/org/infinity/search/SearchResource.java +++ b/src/org/infinity/search/SearchResource.java @@ -95,12 +95,12 @@ import org.infinity.resource.ui.ResourceListModel; import org.infinity.util.DebugTimer; import org.infinity.util.IdsMapEntry; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.SimpleListModel; import org.infinity.util.Threading; import org.infinity.util.io.StreamUtils; import org.infinity.util.tuples.Couple; -import org.tinylog.Logger; public class SearchResource extends ChildFrame implements ActionListener, PropertyChangeListener, Runnable { private static final String[] OPTION_PANELS = { "ARE", "CRE", "EFF", "ITM", "PRO", "SPL", "STO", "VVC" }; @@ -109,7 +109,7 @@ public class SearchResource extends ChildFrame implements ActionListener, Proper private static final String PROPERTY_OPTIONS = "NearInfinity.Options.IsEmpty"; private final HashMap mapOptionsPanel = new HashMap<>(); - private final JProgressBar pbProgress = new JProgressBar();; + private final JProgressBar pbProgress = new JProgressBar(); private JPanel pFindOptions, pBottomBar; private JList listResults; diff --git a/src/org/infinity/search/SongReferenceSearcher.java b/src/org/infinity/search/SongReferenceSearcher.java index b0a3ce94d..c44bbf853 100644 --- a/src/org/infinity/search/SongReferenceSearcher.java +++ b/src/org/infinity/search/SongReferenceSearcher.java @@ -25,8 +25,8 @@ import org.infinity.resource.mus.MusResource; import org.infinity.util.IdsMap; import org.infinity.util.IdsMapCache; +import org.infinity.util.Logger; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * Performs search of the specified song in the {@link AreResource areas}, {@link BcsResource scripts} and diff --git a/src/org/infinity/search/StringReferenceSearcher.java b/src/org/infinity/search/StringReferenceSearcher.java index 6b0be6fbf..140bd1a37 100644 --- a/src/org/infinity/search/StringReferenceSearcher.java +++ b/src/org/infinity/search/StringReferenceSearcher.java @@ -25,7 +25,7 @@ import org.infinity.resource.key.ResourceEntry; import org.infinity.resource.sav.SavResource; import org.infinity.resource.text.PlainTextResource; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** Performs search of the specified string reference in other resources. */ public final class StringReferenceSearcher extends AbstractReferenceSearcher { diff --git a/src/org/infinity/search/TextResourceSearcher.java b/src/org/infinity/search/TextResourceSearcher.java index d3a520a26..38a16e335 100644 --- a/src/org/infinity/search/TextResourceSearcher.java +++ b/src/org/infinity/search/TextResourceSearcher.java @@ -32,7 +32,7 @@ import org.infinity.resource.ResourceFactory; import org.infinity.resource.TextResource; import org.infinity.resource.key.ResourceEntry; -import org.tinylog.Logger; +import org.infinity.util.Logger; public final class TextResourceSearcher extends AbstractSearcher implements Runnable, ActionListener { private final ChildFrame inputFrame; diff --git a/src/org/infinity/search/advanced/AdvancedSearch.java b/src/org/infinity/search/advanced/AdvancedSearch.java index e5a9bf88b..a10eea936 100644 --- a/src/org/infinity/search/advanced/AdvancedSearch.java +++ b/src/org/infinity/search/advanced/AdvancedSearch.java @@ -75,10 +75,10 @@ import org.infinity.resource.key.ResourceEntry; import org.infinity.search.ReferenceHitFrame; import org.infinity.util.DebugTimer; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.SimpleListModel; import org.infinity.util.Threading; -import org.tinylog.Logger; public class AdvancedSearch extends ChildFrame implements Runnable { /** Indicates how to evaluate filter matches against a resource. */ diff --git a/src/org/infinity/search/advanced/AdvancedSearchWorker.java b/src/org/infinity/search/advanced/AdvancedSearchWorker.java index f9327626f..fce5e5c0c 100644 --- a/src/org/infinity/search/advanced/AdvancedSearchWorker.java +++ b/src/org/infinity/search/advanced/AdvancedSearchWorker.java @@ -24,7 +24,7 @@ import org.infinity.resource.StructEntry; import org.infinity.resource.key.ResourceEntry; import org.infinity.search.ReferenceHitFrame; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Worker class for performing a full match against a resource entry. diff --git a/src/org/infinity/search/advanced/FilterInput.java b/src/org/infinity/search/advanced/FilterInput.java index 06e153aa7..39961f17d 100644 --- a/src/org/infinity/search/advanced/FilterInput.java +++ b/src/org/infinity/search/advanced/FilterInput.java @@ -71,7 +71,7 @@ import org.infinity.resource.key.ResourceEntry; import org.infinity.resource.ui.ResourceListModel; import org.infinity.util.DataString; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Input dialog for a advanced search filter definition. diff --git a/src/org/infinity/search/advanced/NumberFormatterEx.java b/src/org/infinity/search/advanced/NumberFormatterEx.java index 4825357d6..9ea19c3d0 100644 --- a/src/org/infinity/search/advanced/NumberFormatterEx.java +++ b/src/org/infinity/search/advanced/NumberFormatterEx.java @@ -11,7 +11,7 @@ import javax.swing.JFormattedTextField.AbstractFormatter; import org.infinity.util.DataString; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * A simplified NumberFormatter that handles conversion from Object to String and back. Allowed text input is limited to diff --git a/src/org/infinity/search/advanced/XmlConfig.java b/src/org/infinity/search/advanced/XmlConfig.java index 3b7166c41..8b13d7130 100644 --- a/src/org/infinity/search/advanced/XmlConfig.java +++ b/src/org/infinity/search/advanced/XmlConfig.java @@ -27,7 +27,7 @@ import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; -import org.tinylog.Logger; +import org.infinity.util.Logger; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; diff --git a/src/org/infinity/updater/UpdateCheck.java b/src/org/infinity/updater/UpdateCheck.java index 9a91311fe..ad405edbc 100644 --- a/src/org/infinity/updater/UpdateCheck.java +++ b/src/org/infinity/updater/UpdateCheck.java @@ -42,7 +42,7 @@ import org.infinity.gui.ViewerUtil; import org.infinity.gui.WindowBlocker; import org.infinity.updater.UpdateInfo.Release; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Shows information about available updates and providing options how to deal with them. diff --git a/src/org/infinity/updater/UpdateInfo.java b/src/org/infinity/updater/UpdateInfo.java index 9dccb6a70..1a0dc3dc2 100644 --- a/src/org/infinity/updater/UpdateInfo.java +++ b/src/org/infinity/updater/UpdateInfo.java @@ -22,12 +22,12 @@ import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; +import org.infinity.util.Logger; import org.infinity.util.Misc; import org.infinity.util.io.StreamUtils; import org.infinity.util.tuples.Couple; import org.json.JSONArray; import org.json.JSONObject; -import org.tinylog.Logger; import org.w3c.dom.Document; import org.w3c.dom.DocumentType; import org.w3c.dom.Element; diff --git a/src/org/infinity/updater/Updater.java b/src/org/infinity/updater/Updater.java index d5a297020..fddce3f33 100644 --- a/src/org/infinity/updater/Updater.java +++ b/src/org/infinity/updater/Updater.java @@ -29,9 +29,9 @@ import java.util.zip.ZipEntry; import org.infinity.NearInfinity; +import org.infinity.util.Logger; import org.infinity.util.io.FileEx; import org.infinity.util.io.FileManager; -import org.tinylog.Logger; /** * Provides functions for checking, downloading and updating new versions of Near Infinity. diff --git a/src/org/infinity/updater/UpdaterSettings.java b/src/org/infinity/updater/UpdaterSettings.java index 6d829b645..29eed4032 100644 --- a/src/org/infinity/updater/UpdaterSettings.java +++ b/src/org/infinity/updater/UpdaterSettings.java @@ -39,8 +39,8 @@ import org.infinity.gui.ViewerUtil; import org.infinity.gui.WindowBlocker; +import org.infinity.util.Logger; import org.infinity.util.Misc; -import org.tinylog.Logger; /** * Provides a dialog for configuring update-relevant data. diff --git a/src/org/infinity/updater/Utils.java b/src/org/infinity/updater/Utils.java index 59fc2da0c..bdbeeb15e 100644 --- a/src/org/infinity/updater/Utils.java +++ b/src/org/infinity/updater/Utils.java @@ -45,8 +45,8 @@ import javax.net.ssl.SSLPeerUnverifiedException; import org.infinity.util.LauncherUtils; +import org.infinity.util.Logger; import org.infinity.util.io.FileEx; -import org.tinylog.Logger; /** * Generic collection of updater-related methods. diff --git a/src/org/infinity/util/BOMStringReader.java b/src/org/infinity/util/BOMStringReader.java index 48069b1e6..cb1582b69 100644 --- a/src/org/infinity/util/BOMStringReader.java +++ b/src/org/infinity/util/BOMStringReader.java @@ -4,8 +4,6 @@ package org.infinity.util; -import org.tinylog.Logger; - import java.io.IOException; import java.io.StringReader; diff --git a/src/org/infinity/util/CharsetDetector.java b/src/org/infinity/util/CharsetDetector.java index 9644d9359..2161f7485 100644 --- a/src/org/infinity/util/CharsetDetector.java +++ b/src/org/infinity/util/CharsetDetector.java @@ -16,7 +16,6 @@ import org.infinity.resource.Profile; import org.infinity.util.io.FileManager; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * This class provides methods to determine character sets and conversions for selected games and languages. diff --git a/src/org/infinity/util/CreMapCache.java b/src/org/infinity/util/CreMapCache.java index d9879b9d2..e61b3af65 100644 --- a/src/org/infinity/util/CreMapCache.java +++ b/src/org/infinity/util/CreMapCache.java @@ -19,7 +19,6 @@ import org.infinity.resource.are.AreResource; import org.infinity.resource.cre.CreResource; import org.infinity.resource.key.ResourceEntry; -import org.tinylog.Logger; /** * Maintains a list of script names to CRE resource mappings. diff --git a/src/org/infinity/util/FileDeletionHook.java b/src/org/infinity/util/FileDeletionHook.java index 2ab365920..ee7ba96d3 100644 --- a/src/org/infinity/util/FileDeletionHook.java +++ b/src/org/infinity/util/FileDeletionHook.java @@ -10,7 +10,6 @@ import java.util.Set; import org.infinity.util.io.FileEx; -import org.tinylog.Logger; /** * Attempts to delete all registered files when the JVM terminates. diff --git a/src/org/infinity/util/IdsMapCache.java b/src/org/infinity/util/IdsMapCache.java index e06acacaf..210df221c 100644 --- a/src/org/infinity/util/IdsMapCache.java +++ b/src/org/infinity/util/IdsMapCache.java @@ -16,7 +16,6 @@ import org.infinity.resource.ResourceFactory; import org.infinity.resource.bcs.ScriptInfo; import org.infinity.resource.key.ResourceEntry; -import org.tinylog.Logger; public class IdsMapCache { /** Maps upper-cased name of IDS resource to parsed resource. */ diff --git a/src/org/infinity/util/IniMap.java b/src/org/infinity/util/IniMap.java index cbe3ce44e..51189a4ee 100644 --- a/src/org/infinity/util/IniMap.java +++ b/src/org/infinity/util/IniMap.java @@ -14,7 +14,6 @@ import org.infinity.resource.key.ResourceEntry; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * Parses Infinity Engine INI files. diff --git a/src/org/infinity/util/IniMapCache.java b/src/org/infinity/util/IniMapCache.java index 28edbaf89..ab384bd49 100644 --- a/src/org/infinity/util/IniMapCache.java +++ b/src/org/infinity/util/IniMapCache.java @@ -9,7 +9,6 @@ import org.infinity.resource.ResourceFactory; import org.infinity.resource.key.ResourceEntry; -import org.tinylog.Logger; public class IniMapCache { private static final HashMap MAP = new HashMap<>(); diff --git a/src/org/infinity/util/IniMapEntry.java b/src/org/infinity/util/IniMapEntry.java index 9b6ff2e8c..490c96c8e 100644 --- a/src/org/infinity/util/IniMapEntry.java +++ b/src/org/infinity/util/IniMapEntry.java @@ -11,7 +11,6 @@ import java.util.regex.PatternSyntaxException; import org.infinity.datatype.StringRef; -import org.tinylog.Logger; public class IniMapEntry { /** Regular expression that can be used to split position values in {@link #splitValues(String, String)}. */ diff --git a/src/org/infinity/util/LauncherUtils.java b/src/org/infinity/util/LauncherUtils.java index a3e04a442..44f955aac 100644 --- a/src/org/infinity/util/LauncherUtils.java +++ b/src/org/infinity/util/LauncherUtils.java @@ -12,8 +12,6 @@ import java.net.URL; import java.nio.file.Path; -import org.tinylog.Logger; - /** * A helper class for launching default applications associated with the specified file or URL arguments. */ diff --git a/src/org/infinity/util/Logger.java b/src/org/infinity/util/Logger.java new file mode 100644 index 000000000..c1e057f17 --- /dev/null +++ b/src/org/infinity/util/Logger.java @@ -0,0 +1,606 @@ +// Near Infinity - An Infinity Engine Browser and Editor +// Copyright (C) 2001 Jon Olav Hauglid +// See LICENSE.txt for license information + +package org.infinity.util; + +import org.infinity.AppOption; +import org.tinylog.Level; +import org.tinylog.Supplier; +import org.tinylog.TaggedLogger; + +/** + * Wrapper class for the {@link org.tinylog.Logger} class from the tinylog package to provide more control over log + * level visibility. + */ +public class Logger { + /** + * Gets a tagged logger instance. Tags are case-sensitive. + * + * @param tag Tag for logger or {@code null} for receiving an untagged logger + * @return Logger instance + */ + public static TaggedLogger tag(final String tag) { + return org.tinylog.Logger.tag(tag); + } + + /** + * Gets a tagged logger instance that logs to multiple tags. Tags are case-sensitive. + * + * @param tags Tags for the logger or nothing for an untagged logger. If specified, each tag should be unique + * @return Logger instance + */ + public static TaggedLogger tags(final String... tags) { + return org.tinylog.Logger.tags(tags); + } + + /** + * Checks whether log entries at {@link Level#TRACE TRACE} level will be output. + * + * @return {@code true} if {@link Level#TRACE TRACE} level is enabled, {@code false} if disabled + */ + public static boolean isTraceEnabled() { + return isLogLevelEnabled(Level.TRACE); + } + + /** + * Logs a message at {@link Level#TRACE TRACE} level. + * + * @param message String or any other object with a meaningful {@link #toString()} method + */ + public static void trace(final Object message) { + if (isTraceEnabled()) + org.tinylog.Logger.trace(message); + } + + /** + * Logs a lazy message at {@link Level#TRACE TRACE} level. The message will be only evaluated if the log entry is + * really output. + * + * @param message Function that produces the message + */ + public static void trace(final Supplier message) { + if (isTraceEnabled()) + org.tinylog.Logger.trace(message); + } + + /** + * Logs a formatted message at {@link Level#TRACE TRACE} level. "{}" placeholders will be replaced by given arguments. + * + * @param message Formatted text message to log + * @param arguments Arguments for formatted text message + */ + public static void trace(final String message, final Object... arguments) { + if (isTraceEnabled()) + org.tinylog.Logger.trace(message, arguments); + } + + /** + * Logs a formatted message at {@link Level#TRACE TRACE} level. "{}" placeholders will be replaced by given lazy + * arguments. The arguments will be only evaluated if the log entry is really output. + * + * @param message Formatted text message to log + * @param arguments Functions that produce the arguments for formatted text message + */ + public static void trace(final String message, final Supplier... arguments) { + if (isTraceEnabled()) + org.tinylog.Logger.trace(message, arguments); + } + + /** + * Logs an exception at {@link Level#TRACE TRACE} level. + * + * @param exception Caught exception or any other throwable to log + */ + public static void trace(final Throwable exception) { + if (isTraceEnabled()) + org.tinylog.Logger.trace(exception); + } + + /** + * Logs an exception with a custom message at {@link Level#TRACE TRACE} level. + * + * @param exception Caught exception or any other throwable to log + * @param message Text message to log + */ + public static void trace(final Throwable exception, final String message) { + if (isTraceEnabled()) + org.tinylog.Logger.trace(exception, message); + } + + /** + * Logs an exception with a custom lazy message at {@link Level#TRACE TRACE} level. The message will be only evaluated + * if the log entry is really output. + * + * @param exception Caught exception or any other throwable to log + * @param message Function that produces the message + */ + public static void trace(final Throwable exception, final Supplier message) { + if (isTraceEnabled()) + org.tinylog.Logger.trace(exception, message); + } + + /** + * Logs an exception with a formatted custom message at {@link Level#TRACE TRACE} level. "{}" placeholders will be + * replaced by given arguments. + * + * @param exception Caught exception or any other throwable to log + * @param message Formatted text message to log + * @param arguments Arguments for formatted text message + */ + public static void trace(final Throwable exception, final String message, final Object... arguments) { + if (isTraceEnabled()) + org.tinylog.Logger.trace(exception, message, arguments); + } + + /** + * Logs an exception with a formatted message at {@link Level#TRACE TRACE} level. "{}" placeholders will be replaced + * by given lazy arguments. The arguments will be only evaluated if the log entry is really output. + * + * @param exception Caught exception or any other throwable to log + * @param message Formatted text message to log + * @param arguments Functions that produce the arguments for formatted text message + */ + public static void trace(final Throwable exception, final String message, final Supplier... arguments) { + if (isTraceEnabled()) + org.tinylog.Logger.trace(exception, message, arguments); + } + + /** + * Checks whether log entries at {@link Level#DEBUG DEBUG} level will be output. + * + * @return {@code true} if {@link Level#DEBUG DEBUG} level is enabled, {@code false} if disabled + */ + public static boolean isDebugEnabled() { + return isLogLevelEnabled(Level.DEBUG); + } + + /** + * Logs a message at {@link Level#DEBUG DEBUG} level. + * + * @param message String or any other object with a meaningful {@link #toString()} method + */ + public static void debug(final Object message) { + if (isDebugEnabled()) + org.tinylog.Logger.debug(message); + } + + /** + * Logs a lazy message at {@link Level#DEBUG DEBUG} level. The message will be only evaluated if the log entry is + * really output. + * + * @param message Function that produces the message + */ + public static void debug(final Supplier message) { + if (isDebugEnabled()) + org.tinylog.Logger.debug(message); + } + + /** + * Logs a formatted message at {@link Level#DEBUG DEBUG} level. "{}" placeholders will be replaced by given arguments. + * + * @param message Formatted text message to log + * @param arguments Arguments for formatted text message + */ + public static void debug(final String message, final Object... arguments) { + if (isDebugEnabled()) + org.tinylog.Logger.debug(message, arguments); + } + + /** + * Logs a formatted message at {@link Level#DEBUG DEBUG} level. "{}" placeholders will be replaced by given lazy + * arguments. The arguments will be only evaluated if the log entry is really output. + * + * @param message Formatted text message to log + * @param arguments Functions that produce the arguments for formatted text message + */ + public static void debug(final String message, final Supplier... arguments) { + if (isDebugEnabled()) + org.tinylog.Logger.debug(message, arguments); + } + + /** + * Logs an exception at {@link Level#DEBUG DEBUG} level. + * + * @param exception Caught exception or any other throwable to log + */ + public static void debug(final Throwable exception) { + if (isDebugEnabled()) + org.tinylog.Logger.debug(exception); + } + + /** + * Logs an exception with a custom message at {@link Level#DEBUG DEBUG} level. + * + * @param exception Caught exception or any other throwable to log + * @param message Text message to log + */ + public static void debug(final Throwable exception, final String message) { + if (isDebugEnabled()) + org.tinylog.Logger.debug(exception, message); + } + + /** + * Logs an exception with a custom lazy message at {@link Level#DEBUG DEBUG} level. The message will be only evaluated + * if the log entry is really output. + * + * @param exception Caught exception or any other throwable to log + * @param message Function that produces the message + */ + public static void debug(final Throwable exception, final Supplier message) { + if (isDebugEnabled()) + org.tinylog.Logger.debug(exception, message); + } + + /** + * Logs an exception with a formatted custom message at {@link Level#DEBUG DEBUG} level. "{}" placeholders will be + * replaced by given arguments. + * + * @param exception Caught exception or any other throwable to log + * @param message Formatted text message to log + * @param arguments Arguments for formatted text message + */ + public static void debug(final Throwable exception, final String message, final Object... arguments) { + if (isDebugEnabled()) + org.tinylog.Logger.debug(exception, message, arguments); + } + + /** + * Logs an exception with a formatted message at {@link Level#DEBUG DEBUG} level. "{}" placeholders will be replaced + * by given lazy arguments. The arguments will be only evaluated if the log entry is really output. + * + * @param exception Caught exception or any other throwable to log + * @param message Formatted text message to log + * @param arguments Functions that produce the arguments for formatted text message + */ + public static void debug(final Throwable exception, final String message, final Supplier... arguments) { + if (isDebugEnabled()) + org.tinylog.Logger.debug(exception, message, arguments); + } + + /** + * Checks whether log entries at {@link Level#INFO INFO} level will be output. + * + * @return {@code true} if {@link Level#INFO INFO} level is enabled, {@code false} if disabled + */ + public static boolean isInfoEnabled() { + return isLogLevelEnabled(Level.INFO); + } + + /** + * Logs a message at {@link Level#INFO INFO} level. + * + * @param message String or any other object with a meaningful {@link #toString()} method + */ + public static void info(final Object message) { + if (isInfoEnabled()) + org.tinylog.Logger.info(message); + } + + /** + * Logs a lazy message at {@link Level#INFO INFO} level. The message will be only evaluated if the log entry is really + * output. + * + * @param message Function that produces the message + */ + public static void info(final Supplier message) { + if (isInfoEnabled()) + org.tinylog.Logger.info(message); + } + + /** + * Logs a formatted message at {@link Level#INFO INFO} level. "{}" placeholders will be replaced by given arguments. + * + * @param message Formatted text message to log + * @param arguments Arguments for formatted text message + */ + public static void info(final String message, final Object... arguments) { + if (isInfoEnabled()) + org.tinylog.Logger.info(message, arguments); + } + + /** + * Logs a formatted message at {@link Level#INFO INFO} level. "{}" placeholders will be replaced by given lazy + * arguments. The arguments will be only evaluated if the log entry is really output. + * + * @param message Formatted text message to log + * @param arguments Functions that produce the arguments for formatted text message + */ + public static void info(final String message, final Supplier... arguments) { + if (isInfoEnabled()) + org.tinylog.Logger.info(message, arguments); + } + + /** + * Logs an exception at {@link Level#INFO INFO} level. + * + * @param exception Caught exception or any other throwable to log + */ + public static void info(final Throwable exception) { + if (isInfoEnabled()) + org.tinylog.Logger.info(exception); + } + + /** + * Logs an exception with a custom message at {@link Level#INFO INFO} level. + * + * @param exception Caught exception or any other throwable to log + * @param message Text message to log + */ + public static void info(final Throwable exception, final String message) { + if (isInfoEnabled()) + org.tinylog.Logger.info(exception, message); + } + + /** + * Logs an exception with a custom lazy message at {@link Level#INFO INFO} level. The message will be only evaluated + * if the log entry is really output. + * + * @param exception Caught exception or any other throwable to log + * @param message Function that produces the message + */ + public static void info(final Throwable exception, final Supplier message) { + if (isInfoEnabled()) + org.tinylog.Logger.info(exception, message); + } + + /** + * Logs an exception with a formatted custom message at {@link Level#INFO INFO} level. "{}" placeholders will be + * replaced by given arguments. + * + * @param exception Caught exception or any other throwable to log + * @param message Formatted text message to log + * @param arguments Arguments for formatted text message + */ + public static void info(final Throwable exception, final String message, final Object... arguments) { + if (isInfoEnabled()) + org.tinylog.Logger.info(exception, message, arguments); + } + + /** + * Logs an exception with a formatted message at {@link Level#INFO INFO} level. "{}" placeholders will be replaced by + * given lazy arguments. The arguments will be only evaluated if the log entry is really output. + * + * @param exception Caught exception or any other throwable to log + * @param message Formatted text message to log + * @param arguments Functions that produce the arguments for formatted text message + */ + public static void info(final Throwable exception, final String message, final Supplier... arguments) { + if (isInfoEnabled()) + org.tinylog.Logger.info(exception, message, arguments); + } + + /** + * Checks whether log entries at {@link Level#WARN WARN} level will be output. + * + * @return {@code true} if {@link Level#WARN WARN} level is enabled, {@code false} if disabled + */ + public static boolean isWarnEnabled() { + return isLogLevelEnabled(Level.WARN); + } + + /** + * Logs a message at {@link Level#WARN WARN} level. + * + * @param message String or any other object with a meaningful {@link #toString()} method + */ + public static void warn(final Object message) { + if (isWarnEnabled()) + org.tinylog.Logger.warn(message); + } + + /** + * Logs a lazy message at {@link Level#WARN WARN} level. The message will be only evaluated if the log entry is really + * output. + * + * @param message Function that produces the message + */ + public static void warn(final Supplier message) { + if (isWarnEnabled()) + org.tinylog.Logger.warn(message); + } + + /** + * Logs a formatted message at {@link Level#WARN WARN} level. "{}" placeholders will be replaced by given arguments. + * + * @param message Formatted text message to log + * @param arguments Arguments for formatted text message + */ + public static void warn(final String message, final Object... arguments) { + if (isWarnEnabled()) + org.tinylog.Logger.warn(message, arguments); + } + + /** + * Logs a formatted message at {@link Level#WARN WARN} level. "{}" placeholders will be replaced by given lazy + * arguments. The arguments will be only evaluated if the log entry is really output. + * + * @param message Formatted text message to log + * @param arguments Functions that produce the arguments for formatted text message + */ + public static void warn(final String message, final Supplier... arguments) { + if (isWarnEnabled()) + org.tinylog.Logger.warn(message, arguments); + } + + /** + * Logs an exception at {@link Level#WARN WARN} level. + * + * @param exception Caught exception or any other throwable to log + */ + public static void warn(final Throwable exception) { + if (isWarnEnabled()) + org.tinylog.Logger.warn(exception); + } + + /** + * Logs an exception with a custom message at {@link Level#WARN WARN} level. + * + * @param exception Caught exception or any other throwable to log + * @param message Text message to log + */ + public static void warn(final Throwable exception, final String message) { + if (isWarnEnabled()) + org.tinylog.Logger.warn(exception, message); + } + + /** + * Logs an exception with a custom lazy message at {@link Level#WARN WARN} level. The message will be only evaluated + * if the log entry is really output. + * + * @param exception Caught exception or any other throwable to log + * @param message Function that produces the message + */ + public static void warn(final Throwable exception, final Supplier message) { + if (isWarnEnabled()) + org.tinylog.Logger.warn(exception, message); + } + + /** + * Logs an exception with a formatted custom message at {@link Level#WARN WARN} level. "{}" placeholders will be + * replaced by given arguments. + * + * @param exception Caught exception or any other throwable to log + * @param message Formatted text message to log + * @param arguments Arguments for formatted text message + */ + public static void warn(final Throwable exception, final String message, final Object... arguments) { + if (isWarnEnabled()) + org.tinylog.Logger.warn(exception, message, arguments); + } + + /** + * Logs an exception with a formatted message at {@link Level#WARN WARN} level. "{}" placeholders will be replaced by + * given lazy arguments. The arguments will be only evaluated if the log entry is really output. + * + * @param exception Caught exception or any other throwable to log + * @param message Formatted text message to log + * @param arguments Functions that produce the arguments for formatted text message + */ + public static void warn(final Throwable exception, final String message, final Supplier... arguments) { + if (isWarnEnabled()) + org.tinylog.Logger.warn(exception, message, arguments); + } + + /** + * Checks whether log entries at {@link Level#ERROR ERROR} level will be output. + * + * @return {@code true} if {@link Level#ERROR ERROR} level is enabled, {@code false} if disabled + */ + public static boolean isErrorEnabled() { + return isLogLevelEnabled(Level.ERROR); + } + + /** + * Logs a message at {@link Level#ERROR ERROR} level. + * + * @param message String or any other object with a meaningful {@link #toString()} method + */ + public static void error(final Object message) { + if (isErrorEnabled()) + org.tinylog.Logger.error(message); + } + + /** + * Logs a lazy message at {@link Level#ERROR ERROR} level. The message will be only evaluated if the log entry is + * really output. + * + * @param message Function that produces the message + */ + public static void error(final Supplier message) { + if (isErrorEnabled()) + org.tinylog.Logger.error(message); + } + + /** + * Logs a formatted message at {@link Level#ERROR ERROR} level. "{}" placeholders will be replaced by given arguments. + * + * @param message Formatted text message to log + * @param arguments Arguments for formatted text message + */ + public static void error(final String message, final Object... arguments) { + if (isErrorEnabled()) + org.tinylog.Logger.error(message, arguments); + } + + /** + * Logs a formatted message at {@link Level#ERROR ERROR} level. "{}" placeholders will be replaced by given lazy + * arguments. The arguments will be only evaluated if the log entry is really output. + * + * @param message Formatted text message to log + * @param arguments Functions that produce the arguments for formatted text message + */ + public static void error(final String message, final Supplier... arguments) { + if (isErrorEnabled()) + org.tinylog.Logger.error(message, arguments); + } + + /** + * Logs an exception at {@link Level#ERROR ERROR} level. + * + * @param exception Caught exception or any other throwable to log + */ + public static void error(final Throwable exception) { + if (isErrorEnabled()) + org.tinylog.Logger.error(exception); + } + + /** + * Logs an exception with a custom message at {@link Level#ERROR ERROR} level. + * + * @param exception Caught exception or any other throwable to log + * @param message Text message to log + */ + public static void error(final Throwable exception, final String message) { + if (isErrorEnabled()) + org.tinylog.Logger.error(exception, message); + } + + /** + * Logs an exception with a custom lazy message at {@link Level#ERROR ERROR} level. The message will be only evaluated + * if the log entry is really output. + * + * @param exception Caught exception or any other throwable to log + * @param message Function that produces the message + */ + public static void error(final Throwable exception, final Supplier message) { + if (isErrorEnabled()) + org.tinylog.Logger.error(exception, message); + } + + /** + * Logs an exception with a formatted custom message at {@link Level#ERROR ERROR} level. "{}" placeholders will be + * replaced by given arguments. + * + * @param exception Caught exception or any other throwable to log + * @param message Formatted text message to log + * @param arguments Arguments for formatted text message + */ + public static void error(final Throwable exception, final String message, final Object... arguments) { + if (isErrorEnabled()) + org.tinylog.Logger.error(exception, message, arguments); + } + + /** + * Logs an exception with a formatted message at {@link Level#ERROR ERROR} level. "{}" placeholders will be replaced + * by given lazy arguments. The arguments will be only evaluated if the log entry is really output. + * + * @param exception Caught exception or any other throwable to log + * @param message Formatted text message to log + * @param arguments Functions that produce the arguments for formatted text message + */ + public static void error(final Throwable exception, final String message, final Supplier... arguments) { + if (isErrorEnabled()) + org.tinylog.Logger.error(exception, message, arguments); + } + + /** + * Checks if the given severity level is covered by the minimum level specified in the app preferences. + * + * @param level Severity level to check. + * @return {@code true} if the given severity level is covered, otherwise {@code false}. + */ + private static boolean isLogLevelEnabled(Level level) { + return (level != null) && AppOption.APP_LOG_LEVEL.getIntValue() <= level.ordinal(); + } +} diff --git a/src/org/infinity/util/LuaParser.java b/src/org/infinity/util/LuaParser.java index 32e1ca32b..eafa6f0ca 100644 --- a/src/org/infinity/util/LuaParser.java +++ b/src/org/infinity/util/LuaParser.java @@ -13,7 +13,6 @@ import org.infinity.resource.key.ResourceEntry; import org.infinity.resource.text.PlainTextResource; -import org.tinylog.Logger; /** * Provides methods for converting Lua table structures into LuaEntry objects. Note: Not all available Lua features are diff --git a/src/org/infinity/util/MassExporter.java b/src/org/infinity/util/MassExporter.java index a5794e0bc..3bf53193a 100644 --- a/src/org/infinity/util/MassExporter.java +++ b/src/org/infinity/util/MassExporter.java @@ -86,7 +86,6 @@ import org.infinity.util.io.FileEx; import org.infinity.util.io.FileManager; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; public final class MassExporter extends ChildFrame implements ActionListener, ListSelectionListener, DocumentListener, Runnable { private static final String FMT_PROGRESS = "Processing resource %d/%d"; diff --git a/src/org/infinity/util/Misc.java b/src/org/infinity/util/Misc.java index af75c96e8..e96164c46 100644 --- a/src/org/infinity/util/Misc.java +++ b/src/org/infinity/util/Misc.java @@ -21,7 +21,6 @@ import org.infinity.AppOption; import org.infinity.NearInfinity; import org.infinity.resource.Profile; -import org.tinylog.Logger; /** * A general-purpose class containing useful function not fitting elsewhere. diff --git a/src/org/infinity/util/Platform.java b/src/org/infinity/util/Platform.java index 8753c73e6..8781c36e7 100644 --- a/src/org/infinity/util/Platform.java +++ b/src/org/infinity/util/Platform.java @@ -4,8 +4,6 @@ package org.infinity.util; -import org.tinylog.Logger; - import java.io.File; import java.nio.file.FileSystems; import java.util.Locale; diff --git a/src/org/infinity/util/StringTable.java b/src/org/infinity/util/StringTable.java index f3232efac..3013ee7e8 100644 --- a/src/org/infinity/util/StringTable.java +++ b/src/org/infinity/util/StringTable.java @@ -29,7 +29,6 @@ import org.infinity.updater.Utils; import org.infinity.util.io.FileEx; import org.infinity.util.io.StreamUtils; -import org.tinylog.Logger; /** * Provides operations for reading, writing and querying information about string tables. diff --git a/src/org/infinity/util/StructClipboard.java b/src/org/infinity/util/StructClipboard.java index 31fe3d203..ca458fb25 100644 --- a/src/org/infinity/util/StructClipboard.java +++ b/src/org/infinity/util/StructClipboard.java @@ -21,7 +21,6 @@ import org.infinity.resource.cre.CreResource; import org.infinity.resource.itm.ItmResource; import org.infinity.resource.spl.SplResource; -import org.tinylog.Logger; public final class StructClipboard { public static final int CLIPBOARD_EMPTY = 0; diff --git a/src/org/infinity/util/Table2da.java b/src/org/infinity/util/Table2da.java index 5c030d2b5..ebb3c155c 100644 --- a/src/org/infinity/util/Table2da.java +++ b/src/org/infinity/util/Table2da.java @@ -10,7 +10,6 @@ import org.infinity.resource.ResourceFactory; import org.infinity.resource.key.ResourceEntry; import org.infinity.resource.text.PlainTextResource; -import org.tinylog.Logger; /** * Stores content of a 2DA resource as table. diff --git a/src/org/infinity/util/Threading.java b/src/org/infinity/util/Threading.java index cbdabb7ed..e915a223d 100644 --- a/src/org/infinity/util/Threading.java +++ b/src/org/infinity/util/Threading.java @@ -17,8 +17,6 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import org.tinylog.Logger; - /** * A convenience class for performing multiple tasks in parallel. */ diff --git a/src/org/infinity/util/io/DlcManager.java b/src/org/infinity/util/io/DlcManager.java index 5c7b81f26..b9f95549d 100644 --- a/src/org/infinity/util/io/DlcManager.java +++ b/src/org/infinity/util/io/DlcManager.java @@ -14,9 +14,9 @@ import java.nio.file.spi.FileSystemProvider; import java.util.HashMap; +import org.infinity.util.Logger; import org.infinity.util.io.zip.DlcFileSystem; import org.infinity.util.io.zip.DlcFileSystemProvider; -import org.tinylog.Logger; /** * Manages available DLCs used by the current game. diff --git a/src/org/infinity/util/io/FileEx.java b/src/org/infinity/util/io/FileEx.java index e97e602e0..23b4180f2 100644 --- a/src/org/infinity/util/io/FileEx.java +++ b/src/org/infinity/util/io/FileEx.java @@ -26,7 +26,7 @@ import java.util.Set; import org.infinity.util.FileDeletionHook; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Expands the {@link File} class by custom filesystem support. diff --git a/src/org/infinity/util/io/FileManager.java b/src/org/infinity/util/io/FileManager.java index e67a71765..fce13fe0c 100644 --- a/src/org/infinity/util/io/FileManager.java +++ b/src/org/infinity/util/io/FileManager.java @@ -11,10 +11,15 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.*; - -import org.tinylog.Logger; - +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; +import java.util.Objects; + +import org.infinity.util.Logger; /** * Central hub for accessing game-related I/O resources. diff --git a/src/org/infinity/util/io/StreamUtils.java b/src/org/infinity/util/io/StreamUtils.java index 991aea682..ed6dd5bf6 100644 --- a/src/org/infinity/util/io/StreamUtils.java +++ b/src/org/infinity/util/io/StreamUtils.java @@ -23,8 +23,8 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; +import org.infinity.util.Logger; import org.infinity.util.Misc; -import org.tinylog.Logger; /** * Collection of useful stream- and buffer-based operations. diff --git a/src/org/infinity/util/io/zip/DlcFileAttributeView.java b/src/org/infinity/util/io/zip/DlcFileAttributeView.java index 08da9574c..9f7da2c90 100644 --- a/src/org/infinity/util/io/zip/DlcFileAttributeView.java +++ b/src/org/infinity/util/io/zip/DlcFileAttributeView.java @@ -35,8 +35,6 @@ package org.infinity.util.io.zip; -import org.tinylog.Logger; - import java.io.IOException; import java.nio.file.attribute.BasicFileAttributeView; import java.nio.file.attribute.FileAttributeView; @@ -44,6 +42,8 @@ import java.util.LinkedHashMap; import java.util.Map; +import org.infinity.util.Logger; + /** * FileAttributeView implementation for DLC archives in zip format. */ diff --git a/src/org/infinity/util/io/zip/DlcPath.java b/src/org/infinity/util/io/zip/DlcPath.java index 24448b89f..7193e3af2 100644 --- a/src/org/infinity/util/io/zip/DlcPath.java +++ b/src/org/infinity/util/io/zip/DlcPath.java @@ -35,8 +35,6 @@ package org.infinity.util.io.zip; -import org.tinylog.Logger; - import java.io.File; import java.io.IOException; import java.io.InputStream; @@ -71,6 +69,8 @@ import java.util.NoSuchElementException; import java.util.Set; +import org.infinity.util.Logger; + /** * Path implementation for DLC archives in zip format. */ diff --git a/src/org/infinity/util/io/zip/ZipCoder.java b/src/org/infinity/util/io/zip/ZipCoder.java index 86f29f9f3..458e50499 100644 --- a/src/org/infinity/util/io/zip/ZipCoder.java +++ b/src/org/infinity/util/io/zip/ZipCoder.java @@ -37,10 +37,15 @@ import java.nio.ByteBuffer; import java.nio.CharBuffer; -import java.nio.charset.*; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CharsetEncoder; +import java.nio.charset.CoderResult; +import java.nio.charset.CodingErrorAction; +import java.nio.charset.StandardCharsets; import java.util.Arrays; -import org.tinylog.Logger; +import org.infinity.util.Logger; /** * Utility class for zipfile name and comment decoding and encoding. diff --git a/src/tinylog.properties b/src/tinylog.properties index 217bf6ccd..5ebcecb2c 100644 --- a/src/tinylog.properties +++ b/src/tinylog.properties @@ -1,5 +1,5 @@ writer = console -writer.level = debug +writer.level = trace writer.format = {level}: {message} writer.stream = err@WARN writingthread = true