Switched to Index brand random Snowflakes instead of SharpIds.
If you were still handling message ids as integers in an environment that can't handle signed 64-bit integers you're going to be having a fun time after this update!
This commit is contained in:
parent
f5c8f2ae1d
commit
e17aed7c25
77 changed files with 290 additions and 338 deletions
SharpChatCommon
33
SharpChatCommon/Logger.cs
Normal file
33
SharpChatCommon/Logger.cs
Normal file
|
@ -0,0 +1,33 @@
|
|||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
|
||||
namespace SharpChat {
|
||||
public static class Logger {
|
||||
public static void Write(string str) {
|
||||
Console.WriteLine(string.Format("[{1}] {0}", str, DateTime.Now));
|
||||
}
|
||||
|
||||
public static void Write(byte[] bytes) {
|
||||
Write(Encoding.UTF8.GetString(bytes));
|
||||
}
|
||||
|
||||
public static void Write(object obj) {
|
||||
Write(obj?.ToString() ?? string.Empty);
|
||||
}
|
||||
|
||||
[Conditional("DEBUG")]
|
||||
public static void Debug(string str) {
|
||||
Write(str);
|
||||
}
|
||||
|
||||
[Conditional("DEBUG")]
|
||||
public static void Debug(byte[] bytes) {
|
||||
Write(bytes);
|
||||
}
|
||||
|
||||
[Conditional("DEBUG")]
|
||||
public static void Debug(object obj) {
|
||||
Write(obj);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue