예제 #1
0
파일: Helpers.cs 프로젝트: Fox-Alpha/nscp
        public void log(string file, int line, LogEntry.Types.Entry.Types.Level level, string message)
        {
            LogEntry.Builder newEntry = LogEntry.CreateBuilder();
            newEntry.AddEntry(LogEntry.Types.Entry.CreateBuilder().SetLevel(level).SetMessage(message).Build());
            LogEntry entry = newEntry.Build();

            using (MemoryStream stream = new MemoryStream())
            {
                entry.WriteTo(stream);
                core.log(stream.ToArray());
            }
        }