Skip to content

Commit

Permalink
Log more (#54)
Browse files Browse the repository at this point in the history
* logging stack trace
  • Loading branch information
amazingalek authored Jan 10, 2020
1 parent b35af6f commit 5d32578
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion OWML.Launcher/App.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace OWML.Launcher
{
public class App
{
private const string Version = "0.3.19";
private const string Version = "0.3.20";

private readonly IOwmlConfig _owmlConfig;
private readonly IModConsole _writer;
Expand Down
2 changes: 1 addition & 1 deletion OWML.Launcher/OutputListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace OWML.Launcher
{
public class OutputListener
{
private const int ReadLength = 128;
private const int ReadLength = 119;

public Action<string> OnOutput;

Expand Down
5 changes: 2 additions & 3 deletions OWML.ModLoader/Owo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void LoadMods()
{
if (_owmlConfig.Verbose)
{
_console.WriteLine("Verbose mod is enabled");
_console.WriteLine("Verbose mode is enabled");
Application.logMessageReceived += OnLogMessageReceived;
}
var manifests = _modFinder.GetManifests();
Expand Down Expand Up @@ -82,10 +82,9 @@ private IModConfig GetModConfig(IModStorage storage)

private void OnLogMessageReceived(string message, string stackTrace, LogType type)
{
_logger.Log($"{type}: {message}");
if (type == LogType.Error || type == LogType.Exception)
{
_console.WriteLine($"{type}: {message}");
_console.WriteLine($"Unity log message: {message}. Stack trace: {stackTrace?.Trim()}");
}
}

Expand Down
2 changes: 1 addition & 1 deletion OWML.SampleMods/OWML.EnableDebugMode/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"name": "EnableDebugMode",
"uniqueName": "Alek.EnableDebugMode",
"version": "0.2",
"owmlVersion": "0.3.19",
"owmlVersion": "0.3.20",
"enabled": false
}
2 changes: 1 addition & 1 deletion OWML.SampleMods/OWML.LoadCustomAssets/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"name": "LoadCustomAssets",
"uniqueName": "Alek.LoadCustomAssets",
"version": "0.4",
"owmlVersion": "0.3.19",
"owmlVersion": "0.3.20",
"enabled": false
}

0 comments on commit 5d32578

Please sign in to comment.