/// <summary>
        /// Instantiate your Log Info Type Here
        /// You can even create your own File Log Info class as per your need
        /// </summary>
        /// <returns></returns>
        public static FileLogInfo DefaultFileLogInfo()
        {
            FileLogInfo fileLogInfo = new FileLogInfo();

            fileLogInfo.FilePath        = FilePaths.ChooseADrive(FileUtils.SpaceLimit, true).Name;
            fileLogInfo.DedicatedFolder = true;
            fileLogInfo.FolderName      = Execution_LogFolderName;
            fileLogInfo.FileName        = GenerateLogFileName();
            fileLogInfo.Presentation    = Presentation.FULL_DETAIL;
            return(fileLogInfo);
        }
Esempio n. 2
0
        public BasicSamples()
        {
            logInfo     = new FileLogger <FileLogInfo>();
            fileLogInfo = new FileLogInfo();

            fileLogInfo.FilePath        = FilePaths.ChooseADrive(FileUtils.SpaceLimit, true).Name;
            fileLogInfo.DedicatedFolder = true;
            fileLogInfo.FolderName      = "YOUR-CUSTOM-FOLDER-NAME";   // <---- Optional
            fileLogInfo.FileName        = "YOUR-CUSTOM-FILE-NAME.log"; // <---- Optional
            fileLogInfo.Presentation    = Presentation.FULL_DETAIL;
        }
Esempio n. 3
0
        public static void StandardLogging()
        {
            FileLogInfo fileLogInfo = new FileLogInfo();

            fileLogInfo.FilePath        = FilePaths.ChooseADrive(FileUtils.SpaceLimit, true).Name;
            fileLogInfo.DedicatedFolder = true;               // <---- Optional
            fileLogInfo.FolderName      = "Your-Folder-Name"; // <---- Optional
            fileLogInfo.FileName        = "Your-File-Name";   // <---- Optional
            fileLogInfo.Presentation    = Presentation.FULL_DETAIL;

            ILogStrategy <FileLogInfo> logInfo = new FileLogger <FileLogInfo>();

            LogEngine.LogMessage(logInfo, fileLogInfo, "Your-Message");
            // OR
            LogEngine.LogMessage(logInfo, fileLogInfo, new Exception("Your-Exception"));
        }