Table of Contents

Class LunyLogger

Namespace
Luny
/
Assembly
Luny.dll

Engine-agnostic logger entry point. Delegates to an installable engine-specific logger. Default fallback logs to console until an engine replaces it. Also provides internal logging system for Luny-specific logs (opt-in).

public static class LunyLogger
Expand Details ...
Inheritance
Object
LunyLogger

Properties

EnableInternalLogging

Enables internal Luny logging system. When enabled, all log messages are recorded in an internal list with frame/time information. Useful for in-game console, file logging, etc.

public static Boolean EnableInternalLogging { get; set; }

Property Value

Boolean

Logger

Installs an engine-specific logger. Pass null to revert to the default console logger.

public static ILunyLogger Logger { get; set; }

Property Value

ILunyLogger

Methods

ClearInternalLog()

Clears all internal log entries.

public static void ClearInternalLog()

GetInternalLog()

Gets the internal log entries. Returns empty array if EnableInternalLogging is false or no logs recorded.

public static IReadOnlyList<LogEntry> GetInternalLog()

Returns

IReadOnlyList<LogEntry>

LogError(Object, Object)

public static void LogError(Object obj, Object context = null)

Parameters

Type Name Description
Object
obj
Object
context

LogError(String, Object)

public static void LogError(String message, Object context = null)

Parameters

Type Name Description
String
message
Object
context

LogException(Exception, Object)

public static void LogException(Exception exception, Object context = null)

Parameters

Type Name Description
Exception
exception
Object
context

LogInfo(Object, Object)

public static void LogInfo(Object obj, Object context = null)

Parameters

Type Name Description
Object
obj
Object
context

LogInfo(String, Object)

public static void LogInfo(String message, Object context = null)

Parameters

Type Name Description
String
message
Object
context

LogWarning(Object, Object)

public static void LogWarning(Object obj, Object context = null)

Parameters

Type Name Description
Object
obj
Object
context

LogWarning(String, Object)

public static void LogWarning(String message, Object context = null)

Parameters

Type Name Description
String
message
Object
context

WriteInternalLogToFile(String)

Writes the internal log to a file. Format: [FrameXXXXXXXX] [Time] [Level] [Context] Message

public static void WriteInternalLogToFile(String path)

Parameters

Type Name Description
String
path