diff --git a/src/bindings/mono/eina_mono/eina_log.cs b/src/bindings/mono/eina_mono/eina_log.cs
index 56882b9000..1e0de41941 100644
--- a/src/bindings/mono/eina_mono/eina_log.cs
+++ b/src/bindings/mono/eina_mono/eina_log.cs
@@ -9,6 +9,7 @@ namespace Eina
{
// Manual wrappers around eina functions
+/// EFL Logging facilities. (Since EFL 1.23)
public class Log
{
[DllImport(efl.Libs.Eina)] private static extern void eina_log_print(
@@ -27,34 +28,55 @@ public class Log
[DllImport(efl.Libs.Eina)] private static extern Level eina_log_level_get();
+ /// The levels of logging.
public enum Level
{
+ /// Critical events.
Critical,
+ /// Error events.
Error,
+ /// Warning events.
Warning,
+ /// Informative events.
Info,
+ /// Debugging messages.
Debug,
+ /// Unknown events.
Unkown = (-2147483647 - 1)
}
+ /// The colors to be used by the logging system.
public class Color
{
+ /// Light red
public static string LIGHTRED = "\033[31;1m";
+ /// Red
public static string RED = "\033[31m";
+ /// Light blue
public static string LIGHTBLUE = "\033[34;1m";
+ /// Blue
public static string BLUE = "\033[34m";
+ /// Green
public static string GREEN = "\033[32;1m";
+ /// Yellow
public static string YELLOW = "\033[33;1m";
+ /// Orange
public static string ORANGE = "\033[0;33m";
+ /// White
public static string WHITE = "\033[37;1m";
+ /// Light cyan
public static string LIGHTCYAN = "\033[36;1m";
+ /// Cyan
public static string CYAN = "\033[36m";
+ /// Reset
public static string RESET = "\033[0m";
+ /// Bold
public static string HIGH = "\033[1m";
}
private static int domain = -1;
+ /// Static class initializer.
static Log()
{
const String name = "mono";
@@ -80,41 +102,70 @@ public class Log
}
}
+ /// Prints a critical message with context info. This context is filled automatically by the C# compiler.
+ /// The message to be printed.
+ /// The line number this method was called from.
+ /// The file this method was called from.
+ /// The enlosing method this method was called from.
public static void Critical(String message, [CallerLineNumber] int line = 0, [CallerFilePath] string file = null, [CallerMemberName] string member = null)
{
EnsureDomainRegistered();
eina_log_print(domain, Level.Critical, file, member, line, message);
}
+ /// Prints an error message with context info. This context is filled automatically by the C# compiler.
+ /// The message to be printed.
+ /// The line number this method was called from.
+ /// The file this method was called from.
+ /// The enlosing method this method was called from.
public static void Error(String message, [CallerLineNumber] int line = 0, [CallerFilePath] string file = null, [CallerMemberName] string member = null)
{
EnsureDomainRegistered();
eina_log_print(domain, Level.Error, file, member, line, message);
}
+ /// Prints a warning message with context info. This context is filled automatically by the C# compiler.
+ /// The message to be printed.
+ /// The line number this method was called from.
+ /// The file this method was called from.
+ /// The enlosing method this method was called from.
public static void Warning(String message, [CallerLineNumber] int line = 0, [CallerFilePath] string file = null, [CallerMemberName] string member = null)
{
EnsureDomainRegistered();
eina_log_print(domain, Level.Warning, file, member, line, message);
}
+ /// Prints an informative message with context info. This context is filled automatically by the C# compiler.
+ /// The message to be printed.
+ /// The line number this method was called from.
+ /// The file this method was called from.
+ /// The enlosing method this method was called from.
public static void Info(String message, [CallerLineNumber] int line = 0, [CallerFilePath] string file = null, [CallerMemberName] string member = null)
{
EnsureDomainRegistered();
eina_log_print(domain, Level.Info, file, member, line, message);
}
+ /// Prints a debug message with context info. This context is filled automatically by the C# compiler.
+ /// The message to be printed.
+ /// The line number this method was called from.
+ /// The file this method was called from.
+ /// The enlosing method this method was called from.
public static void Debug(String message, [CallerLineNumber] int line = 0, [CallerFilePath] string file = null, [CallerMemberName] string member = null)
{
EnsureDomainRegistered();
eina_log_print(domain, Level.Debug, file, member, line, message);
}
+ /// Sets the highest level log messages should be printed. Values larger than this one are ignored.
+ /// The global message level.
public static void GlobalLevelSet(Level level)
{
eina_log_level_set(level);
}
+ /// Gets the lowest level of messages that are not ignored.
+ /// The current message level.
public static Level GlobalLevelGet()
{
return eina_log_level_get();