Beispiel #1
0
        /// <summary>Only loads the session settings.</summary>
        void Awake()
        {
            UnityEngine.Object.DontDestroyOnLoad(gameObject);

            // Read the configs for all the aggregators.
            ConfigAccessor.ReadFieldsInType(typeof(LogInterceptor), null /* instance */);
            ConfigAccessor.ReadFieldsInType(typeof(LogFilter), null /* instance */);
            ConfigAccessor.ReadFieldsInType(
                ConsoleUI.diskLogAggregator.GetType(), ConsoleUI.diskLogAggregator);
            ConfigAccessor.ReadFieldsInType(
                ConsoleUI.rawLogAggregator.GetType(), ConsoleUI.rawLogAggregator);
            ConfigAccessor.ReadFieldsInType(
                ConsoleUI.collapseLogAggregator.GetType(), ConsoleUI.collapseLogAggregator);
            ConfigAccessor.ReadFieldsInType(
                ConsoleUI.smartLogAggregator.GetType(), ConsoleUI.smartLogAggregator);

            // Start all aggregators.
            ConsoleUI.rawLogAggregator.StartCapture();
            ConsoleUI.collapseLogAggregator.StartCapture();
            ConsoleUI.smartLogAggregator.StartCapture();
            ConsoleUI.diskLogAggregator.StartCapture();
            LogInterceptor.StartIntercepting();

            // Load UI configs.
            ConfigAccessor.ReadFieldsInType(typeof(ConsoleUI), null /* instance */);
            ConfigAccessor.ReadFieldsInType(
                typeof(ConsoleUI), this, group: StdPersistentGroups.SessionGroup);
        }
Beispiel #2
0
        void Awake()
        {
            // Read all configs.
            ConfigAccessor.ReadFieldsInType(typeof(ConsoleUI), null /* instance */);
            ConfigAccessor.ReadFieldsInType(typeof(LogInterceptor), null /* instance */);
            ConfigAccessor.ReadFieldsInType(typeof(LogFilter), null /* instance */);
            ConfigAccessor.ReadFieldsInType(
                ConsoleUI.diskLogAggregator.GetType(), ConsoleUI.diskLogAggregator);
            ConfigAccessor.ReadFieldsInType(
                ConsoleUI.rawLogAggregator.GetType(), ConsoleUI.rawLogAggregator);
            ConfigAccessor.ReadFieldsInType(
                ConsoleUI.collapseLogAggregator.GetType(), ConsoleUI.collapseLogAggregator);
            ConfigAccessor.ReadFieldsInType(
                ConsoleUI.smartLogAggregator.GetType(), ConsoleUI.smartLogAggregator);

            // Start all aggregators.
            ConsoleUI.rawLogAggregator.StartCapture();
            ConsoleUI.collapseLogAggregator.StartCapture();
            ConsoleUI.smartLogAggregator.StartCapture();
            ConsoleUI.diskLogAggregator.StartCapture();
            LogInterceptor.StartIntercepting();
        }
Beispiel #3
0
 /// <summary>Stops log capturing by this aggergator.</summary>
 public virtual void StopCapture()
 {
     LogInterceptor.UnregisterPreviewCallback(LogPreview);
     FlushBufferedLogs();
 }
Beispiel #4
0
 /// <summary>Initiates log capturing by this aggergator.</summary>
 /// <remarks>It's ok to call this method multiple times.</remarks>
 public virtual void StartCapture()
 {
     LogInterceptor.RegisterPreviewCallback(LogPreview);
 }