/// <summary>
 /// Setup of Log and a Student.
 /// </summary>
 static Program()
 {
     printer    = new BufferPrinter();
     logReflect = new Log(printer);
     logDynamic = new LogDynamic(printer);
     maria      = new Student(235474, "Maria Joana", 2356, "maria");
 }
        public void TestLogInfo()
        {
            // Arrange
            BufferedPrinter printer = new BufferedPrinter();
            AbstractLog     log     = CreateLog(printer);
            Point           p       = new Point(7, 9);

            // Act
            log.Info(p);

            // Assert
            Assert.AreEqual(
                "GetModule: 11.4017542509914, x: 7",
                printer.buffer.ToString()
                );
        }
Пример #3
0
        public void LogPackageFound(
            string packageId,
            IVersion packageVersion,
            string packageHash,
            string packageFileExtension,
            string packageFullPath,
            bool exactMatchExists
            )
        {
            if (exactMatchExists)
            {
                log.Verbose("##octopus[calamari-found-package]");
            }

            log.VerboseFormat("##octopus[foundPackage id=\"{0}\" version=\"{1}\" versionFormat=\"{2}\" hash=\"{3}\" remotePath=\"{4}\" fileExtension=\"{5}\"]",
                              AbstractLog.ConvertServiceMessageValue(packageId),
                              AbstractLog.ConvertServiceMessageValue(packageVersion.ToString()),
                              AbstractLog.ConvertServiceMessageValue(packageVersion.Format.ToString()),
                              AbstractLog.ConvertServiceMessageValue(packageHash),
                              AbstractLog.ConvertServiceMessageValue(packageFullPath),
                              AbstractLog.ConvertServiceMessageValue(packageFileExtension));
        }
Пример #4
0
 /// <summary>
 /// 初始化LOG系统
 /// </summary>
 public virtual void InitLogger(AbstractLog logger)
 {
     Log.InitLog(logger);
     Log.Info("InitLogger successed");
 }