diff --git a/AssetStudio/TypeTreeHelper.cs b/AssetStudio/TypeTreeHelper.cs index 7b4e959..1814b29 100644 --- a/AssetStudio/TypeTreeHelper.cs +++ b/AssetStudio/TypeTreeHelper.cs @@ -20,7 +20,7 @@ namespace AssetStudio var readed = reader.Position - reader.byteStart; if (readed != reader.byteSize) { - Logger.Info($"Error while read type, read {readed} bytes but expected {reader.byteSize} bytes"); + Logger.Info($"Failed to read type, read {readed} bytes but expected {reader.byteSize} bytes"); } return sb.ToString(); } @@ -177,7 +177,7 @@ namespace AssetStudio var readed = reader.Position - reader.byteStart; if (readed != reader.byteSize) { - Logger.Info($"Error while read type, read {readed} bytes but expected {reader.byteSize} bytes"); + Logger.Info($"Failed to read type, read {readed} bytes but expected {reader.byteSize} bytes"); } return obj; } diff --git a/AssetStudioGUI/AssetStudioGUIForm.Designer.cs b/AssetStudioGUI/AssetStudioGUIForm.Designer.cs index 718732b..d00f83a 100644 --- a/AssetStudioGUI/AssetStudioGUIForm.Designer.cs +++ b/AssetStudioGUI/AssetStudioGUIForm.Designer.cs @@ -599,8 +599,8 @@ // debugMenuItem // this.debugMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.toolStripMenuItem15, this.showConsoleToolStripMenuItem, + this.toolStripMenuItem15, this.writeLogToFileToolStripMenuItem, this.exportClassStructuresMenuItem}); this.debugMenuItem.Name = "debugMenuItem"; @@ -611,8 +611,8 @@ // this.toolStripMenuItem15.CheckOnClick = true; this.toolStripMenuItem15.Name = "toolStripMenuItem15"; - this.toolStripMenuItem15.Size = new System.Drawing.Size(200, 22); - this.toolStripMenuItem15.Text = "Show all error messages"; + this.toolStripMenuItem15.Size = new System.Drawing.Size(288, 22); + this.toolStripMenuItem15.Text = "Show debug messages in console logger"; this.toolStripMenuItem15.Click += new System.EventHandler(this.toolStripMenuItem15_Click); // // showConsoleToolStripMenuItem @@ -621,7 +621,7 @@ this.showConsoleToolStripMenuItem.CheckOnClick = true; this.showConsoleToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; this.showConsoleToolStripMenuItem.Name = "showConsoleToolStripMenuItem"; - this.showConsoleToolStripMenuItem.Size = new System.Drawing.Size(200, 22); + this.showConsoleToolStripMenuItem.Size = new System.Drawing.Size(288, 22); this.showConsoleToolStripMenuItem.Text = "Show console logger"; this.showConsoleToolStripMenuItem.Click += new System.EventHandler(this.showConsoleToolStripMenuItem_Click); // @@ -629,14 +629,14 @@ // this.writeLogToFileToolStripMenuItem.CheckOnClick = true; this.writeLogToFileToolStripMenuItem.Name = "writeLogToFileToolStripMenuItem"; - this.writeLogToFileToolStripMenuItem.Size = new System.Drawing.Size(200, 22); + this.writeLogToFileToolStripMenuItem.Size = new System.Drawing.Size(288, 22); this.writeLogToFileToolStripMenuItem.Text = "Write log to file"; this.writeLogToFileToolStripMenuItem.CheckedChanged += new System.EventHandler(this.writeLogToFileToolStripMenuItem_CheckedChanged); // // exportClassStructuresMenuItem // this.exportClassStructuresMenuItem.Name = "exportClassStructuresMenuItem"; - this.exportClassStructuresMenuItem.Size = new System.Drawing.Size(200, 22); + this.exportClassStructuresMenuItem.Size = new System.Drawing.Size(288, 22); this.exportClassStructuresMenuItem.Text = "Export class structures"; this.exportClassStructuresMenuItem.Click += new System.EventHandler(this.exportClassStructuresMenuItem_Click); // @@ -1284,7 +1284,7 @@ this.goToSceneHierarchyToolStripMenuItem, this.showOriginalFileToolStripMenuItem}); this.contextMenuStrip1.Name = "contextMenuStrip1"; - this.contextMenuStrip1.Size = new System.Drawing.Size(332, 246); + this.contextMenuStrip1.Size = new System.Drawing.Size(332, 224); // // copyToolStripMenuItem // diff --git a/AssetStudioGUI/AssetStudioGUIForm.cs b/AssetStudioGUI/AssetStudioGUIForm.cs index 91829f0..443c9da 100644 --- a/AssetStudioGUI/AssetStudioGUIForm.cs +++ b/AssetStudioGUI/AssetStudioGUIForm.cs @@ -1925,7 +1925,7 @@ namespace AssetStudioGUI private void toolStripMenuItem15_Click(object sender, EventArgs e) { - logger.ShowErrorMessage = toolStripMenuItem15.Checked; + logger.ShowDebugMessage = toolStripMenuItem15.Checked; } private void sceneTreeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) diff --git a/AssetStudioGUI/GUILogger.cs b/AssetStudioGUI/GUILogger.cs index c0c50f9..64127c0 100644 --- a/AssetStudioGUI/GUILogger.cs +++ b/AssetStudioGUI/GUILogger.cs @@ -9,7 +9,7 @@ namespace AssetStudioGUI { class GUILogger : ILogger { - public bool ShowErrorMessage = false; + public bool ShowDebugMessage = false; private bool IsFileLoggerRunning = false; private string LoggerInitString; private string FileLogName; @@ -123,6 +123,8 @@ namespace AssetStudioGUI } //Console logger + if (!ShowDebugMessage && loggerEvent == LoggerEvent.Debug) + return; Console.WriteLine(FormatMessage(loggerEvent, message, toConsole: true)); //GUI logger @@ -132,14 +134,7 @@ namespace AssetStudioGUI MessageBox.Show(message, "Error"); break; case LoggerEvent.Warning: - if (ShowErrorMessage) - { - MessageBox.Show(message, "Warning"); - } - else - { - action("An error has occurred. Turn on \"Show all error messages\" to see details next time."); - } + action("Some warnings occurred. See Console Logger for details."); break; case LoggerEvent.Debug: break; diff --git a/AssetStudioUtility/CubismLive2DExtractor/Live2DExtractor.cs b/AssetStudioUtility/CubismLive2DExtractor/Live2DExtractor.cs index 1681209..d1b606b 100644 --- a/AssetStudioUtility/CubismLive2DExtractor/Live2DExtractor.cs +++ b/AssetStudioUtility/CubismLive2DExtractor/Live2DExtractor.cs @@ -258,7 +258,7 @@ namespace CubismLive2DExtractor } else { - Logger.Debug($"Exported {motions.Count} motion(s)"); + Logger.Info($"Exported {motions.Count} motion(s)"); } #endregion