示例#1
0
        /// <summary>
        /// Closes all existing logs.
        /// Should be called at the end of each session and when game is closing.
        /// </summary>
        public static void Close()
        {
            Lock.AcquireExclusive();

            foreach (var assembly in ModLogs.Keys)
            {
                Log("Closing log", Severity.Level.INFO, "SEPC.Logging", assembly: assembly);
            }

            WriteItems();

            foreach (ModLog modLog in ModLogs.Values)
            {
                modLog.Close();
            }

            LogItems.Clear();
            ModLogs.Clear();
            StringCache.Clear();

            Lock.ReleaseExclusive();
        }
示例#2
0
 private void Entities_OnCloseAll()
 {
     MyAPIGateway.Entities.OnCloseAll -= Entities_OnCloseAll;
     ActionQueue.Clear();
 }