-
Notifications
You must be signed in to change notification settings - Fork 22
debug log changes #39
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,8 @@ namespace NeosModLoader | |
// contains members that only the modloader or the mod itself are intended to access | ||
public abstract class NeosMod : NeosModBase | ||
{ | ||
public static bool IsDebugEnabled() => Logger.IsDebugEnabled(); | ||
public static void DebugFunc(Func<string> messageProducer) => Logger.DebugFuncExternal(messageProducer); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I could see allowing |
||
public static void Debug(string message) => Logger.DebugExternal(message); // needed for binary compatibility (REMOVE IN NEXT MAJOR VERSION) | ||
public static void Debug(object message) => Logger.DebugExternal(message); | ||
public static void Debug(params object[] messages) => Logger.DebugListExternal(messages); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I very much dislike the code duplication of this, but then I guess it's kind of a necessary evil, as they could deviate more in the future, and passing bool arguments isn't good either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the methods are a bit ugly, I agree, but I can't think of a better way of dealing with it. The good news is this crusty API is internal so we can always refactor it later if we have any ideas.