public ConsoleManager(Blackboard blk, Kernel kernel, ConsoleLogWriter log)
 {
     this.kernel = kernel;
     this.blackboard = blk;
     this.log = log;
     this.currentLine = String.Empty;
     this.tabSw = new Stopwatch();
     this.firstTab = false;
     this.history = new CommandHistoryManager();
     this.completionTree = new CompletionTree();
     this.kernel.ConsoleManager = this;
     this.kernel.FillCompletionTree(this.completionTree);
 }
Example #2
0
 public ConsoleManager(Blackboard blk, Kernel kernel, ConsoleLogWriter log)
 {
     this.kernel                = kernel;
     this.blackboard            = blk;
     this.log                   = log;
     this.currentLine           = String.Empty;
     this.tabSw                 = new Stopwatch();
     this.firstTab              = false;
     this.history               = new CommandHistoryManager();
     this.completionTree        = new CompletionTree();
     this.kernel.ConsoleManager = this;
     this.kernel.FillCompletionTree(this.completionTree);
 }
Example #3
0
        /// <summary>
        /// Configures the Log file
        /// </summary>
        private void SetupLogfile()
        {
            Console.Clear();

            if (String.IsNullOrEmpty(this.logFile))
            {
                this.logFile = "log " + DateTime.Now.ToString("yyyy-MM-dd HH.mm.ss") + ".xml";
                if (!Directory.Exists("logs"))
                {
                    try { Directory.CreateDirectory("logs"); }
                    catch { }
                }
                if (Directory.Exists("logs"))
                {
                    this.logFile = Path.Combine("logs", this.logFile);
                }
            }

            FileInfo fi = new FileInfo(this.logFile);

            this.logFile = fi.FullName;

            cLog                           = new ConsoleLogWriter(this.logFile);
            cLog.AppendDate                = true;
            cLog.DefaultPriority           = 1;
            cLog.ConsoleVerbosityThreshold = 5;
            cLog.FileVerbosityThreshold    = 5;

            this.log = new LogWriter(cLog);
            this.log.DefaultVerbosity  = 1;
            this.log.VerbosityTreshold = 5;
            if (this.blackboard != null)
            {
                this.blackboard.Log = this.log;
            }
        }
Example #4
0
        /// <summary>
        /// Configures the Log file
        /// </summary>
        private void SetupLogfile()
        {
            Console.Clear();

            if (String.IsNullOrEmpty(this.logFile))
            {
                this.logFile = "log " + DateTime.Now.ToString("yyyy-MM-dd HH.mm.ss") + ".xml";
                if (!Directory.Exists("logs"))
                {
                    try { Directory.CreateDirectory("logs"); }
                    catch { }
                }
                if (Directory.Exists("logs"))
                    this.logFile = Path.Combine("logs", this.logFile);
            }

            FileInfo fi = new FileInfo(this.logFile);
            this.logFile = fi.FullName;

            cLog = new ConsoleLogWriter(this.logFile);
            cLog.AppendDate = true;
            cLog.DefaultPriority = 1;
            cLog.ConsoleVerbosityThreshold = 5;
            cLog.FileVerbosityThreshold = 5;

            this.log = new LogWriter(cLog);
            this.log.DefaultVerbosity = 1;
            this.log.VerbosityTreshold = 5;
            if (this.blackboard != null)
                this.blackboard.Log = this.log;
        }