mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-09 14:04:41 +02:00
Added log code.
This commit is contained in:
parent
7834b737eb
commit
9dfd6906b9
5 changed files with 70 additions and 15 deletions
56
FFXIVClassic_Lobby_Server/common/Log.cs
Normal file
56
FFXIVClassic_Lobby_Server/common/Log.cs
Normal file
|
@ -0,0 +1,56 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Lobby_Server.common
|
||||
{
|
||||
class Log
|
||||
{
|
||||
public static void error(String message)
|
||||
{
|
||||
Console.Write("[{0}]", DateTime.Now.ToString("dd/MMM HH:mm"));
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.Write("[ERROR]");
|
||||
Console.ForegroundColor = ConsoleColor.Gray ;
|
||||
Console.WriteLine(message);
|
||||
}
|
||||
|
||||
public static void debug(String message)
|
||||
{
|
||||
Console.Write("[{0}]", DateTime.Now.ToString("dd/MMM HH:mm"));
|
||||
Console.ForegroundColor = ConsoleColor.Yellow;
|
||||
Console.Write("[DEBUG]");
|
||||
Console.ForegroundColor = ConsoleColor.Gray;
|
||||
Console.WriteLine(message);
|
||||
}
|
||||
|
||||
public static void info(String message)
|
||||
{
|
||||
Console.Write("[{0}]", DateTime.Now.ToString("dd/MMM HH:mm"));
|
||||
Console.ForegroundColor = ConsoleColor.Cyan;
|
||||
Console.Write("[INFO]");
|
||||
Console.ForegroundColor = ConsoleColor.Gray;
|
||||
Console.WriteLine(message);
|
||||
}
|
||||
|
||||
public static void database(String message)
|
||||
{
|
||||
Console.Write("[{0}]", DateTime.Now.ToString("dd/MMM HH:mm"));
|
||||
Console.ForegroundColor = ConsoleColor.Magenta;
|
||||
Console.Write("[SQL]");
|
||||
Console.ForegroundColor = ConsoleColor.Gray;
|
||||
Console.WriteLine(message);
|
||||
}
|
||||
|
||||
public static void conn(String message)
|
||||
{
|
||||
Console.Write("[{0}]", DateTime.Now.ToString("dd/MMM HH:mm"));
|
||||
Console.ForegroundColor = ConsoleColor.DarkGreen;
|
||||
Console.Write("[CONN]");
|
||||
Console.ForegroundColor = ConsoleColor.Gray;
|
||||
Console.WriteLine(message);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue