8000 UnoCore: add object overloads in Uno.Diagnostics.Log by mortend · Pull Request #447 · fuse-open/uno · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

UnoCore: add object overloads in Uno.Diagnostics.Log #447

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions lib/UnoCore/src/Uno/Diagnostics/Log.uno
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ namespace Uno.Diagnostics
_handler = handler;
}

/** Writes a debug message to the log. */
public static void Debug(object message)
{
WriteLine(LogLevel.Debug, message);
}

/** Writes a debug message to the log. */
public static void Debug(string message)
{
Expand All @@ -37,6 +43,12 @@ namespace Uno.Diagnostics
WriteLine(LogLevel.Debug, format, args);
}

/** Writes an informational message to the log. */
public static void Information(object message)
{
WriteLine(LogLevel.Information, message);
}

/** Writes an informational message to the log. */
public static void Information(string message)
{
Expand All @@ -49,6 +61,12 @@ namespace Uno.Diagnostics
WriteLine(LogLevel.Information, format, args);
}

/** Writes a warning message to the log. */
public static void Warning(object message)
{
WriteLine(LogLevel.Warning, message);
}

/** Writes a warning message to the log. */
public static void Warning(string message)
{
Expand All @@ -61,6 +79,12 @@ namespace Uno.Diagnostics
WriteLine(LogLevel.Warning, format, args);
}

/** Writes an error message to the log. */
public static void Error(object message)
{
WriteLine(LogLevel.Error, message);
}

/** Writes an error message to the log. */
public static void Error(string message)
{
Expand All @@ -73,6 +97,12 @@ namespace Uno.Diagnostics
WriteLine(LogLevel.Error, format, args);
}

/** Writes a fatal error message to the log. */
public static void Fatal(object message)
{
WriteLine(LogLevel.Fatal, message);
}

/** Writes a fatal error message to the log. */
public static void Fatal(string message)
{
Expand All @@ -91,6 +121,12 @@ namespace Uno.Diagnostics
WriteLine(level, string.Format(format, args));
}

/** Writes a message to the log. */
public static void WriteLine(LogLevel level, object message)
{
WriteLine(level, message != null ? message.ToString() : string.Empty);
}

/** Writes a message to the log. */
public static void WriteLine(LogLevel level, string message)
{
Expand Down
0