Class LogWrapper
Wrapper around Owlcat.Runtime.Core.Logging.LogChannel which supports dynamically enabling or disabling verbose logging.
Inheritance
Namespace: BlueprintCore.Utils
Assembly: BlueprintCore.dll
Syntax
public class LogWrapper
Remarks
These log events print to the same output as Wrath's game log events using the Mods channel. They can be viewed
using RemoteConsole or by appending
logging
to the executable startup arguments and reading
AppData\LocalLow\Owlcat Games\Pathfinder Wrath Of The Righteous\GameLog*.txt
.
Constructors
| Improve this Doc View SourceLogWrapper(LogChannel, String)
Declaration
protected LogWrapper(LogChannel logger, string prefix)
Parameters
Type | Name | Description |
---|---|---|
Owlcat.Runtime.Core.Logging.LogChannel | logger | |
System.String | prefix |
Fields
| Improve this Doc View SourceEnableVerboseLogs
Controls whether calls to Verbose(String) are logged. Defaults to false.
Declaration
public bool EnableVerboseLogs
Field Value
Type | Description |
---|---|
System.Boolean |
Remarks
Set this to true while developing or debugging. Consider making this a setting in your modification so users can capture detailed logs when reporting a problem.
Methods
| Improve this Doc View SourceEnableInternalVerboseLogs(Boolean)
Call this if you want verbose internal logs for BlueprintCore. Recommended before filing a bug report, as I may need to see those logs.
Declaration
public static void EnableInternalVerboseLogs(bool enable = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | enable |
Error(String, Exception)
Logs an error with a stack trace as well as an exception, if provided.
Declaration
public virtual void Error(string msg, Exception e = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | msg | |
System.Exception | e |
Get(String)
Returns a LogWrapper which appends the prefix to all log events.
Declaration
public static LogWrapper Get(string prefix)
Parameters
Type | Name | Description |
---|---|---|
System.String | prefix |
Returns
Type | Description |
---|---|
LogWrapper |
Remarks
Uses the Mods logging channel which can be viewed in RemoteConsole.
Info(String)
Declaration
public virtual void Info(string msg)
Parameters
Type | Name | Description |
---|---|---|
System.String | msg |
Verbose(String)
If EnableVerboseLogs is false these log are ignored.
Declaration
public virtual void Verbose(string msg)
Parameters
Type | Name | Description |
---|---|---|
System.String | msg |
Warn(String)
Logs a warning with a stack trace.
Declaration
public virtual void Warn(string msg)
Parameters
Type | Name | Description |
---|---|---|
System.String | msg |