Skip to main content
Glama
ILogService.cs1.94 kB
using System; using System.Collections.Generic; using System.Threading.Tasks; using UnityMCP.Server.Models; namespace UnityMCP.Server.Services { /// <summary> /// Log severity levels /// </summary> public enum LogSeverity { Debug, Info, Warning, Error, Critical } /// <summary> /// Interface for log service /// </summary> public interface ILogService { /// <summary> /// Log a message /// </summary> /// <param name="message">The message to log</param> /// <param name="severity">The severity of the log</param> void Log(string message, LogSeverity severity = LogSeverity.Info); /// <summary> /// Log an error message /// </summary> /// <param name="message">The error message</param> /// <param name="exception">The exception (optional)</param> void LogError(string message, Exception? exception = null); /// <summary> /// Get all logs for a specific log name /// </summary> /// <param name="logName">The name of the log</param> /// <param name="limit">The maximum number of logs to return (0 for all)</param> /// <returns>The log entries</returns> Task<List<LogEntry>> GetLogsByNameAsync(string logName, int limit = 0); /// <summary> /// Append data to a log /// </summary> /// <param name="logName">The name of the log</param> /// <param name="data">The data to append</param> /// <returns>The log entry</returns> Task<LogEntry> AppendToLogAsync(string logName, object data); /// <summary> /// Clear a log /// </summary> /// <param name="logName">The name of the log</param> /// <returns>True if the log was cleared, false otherwise</returns> Task<bool> ClearLogAsync(string logName); } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TSavo/Unity-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server