Ejemplo n.º 1
0
        /// <summary>
        /// Creates the requested log type
        /// </summary>
        /// <param name="logType">the log type</param>
        /// <param name="file">log file</param>
        /// <returns>the log object</returns>
        private static ILog Create(string logType, string file)
        {
            // construct the corresponding log
            ILog log = null;

            switch (logType)
            {
            case "Console":
                log = new LogConsole();
                break;

            case "AutomationFramework":
                log = new LogAutomationFramework();
                break;

            case "File":
                log = new LogFile(file);
                break;

            case "Multiple":
                log = new LogMultiple(file);
                break;

            default:
                log = new LogConsole();
                break;
            }

            // return the created log
            return(log);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructor. It takes the automation framework assembly. The file path is the desktop.
        /// </summary>
        /// <param name="file"></param>
        public LogMultiple(string file)
        {
            // create the log console
            //AutomationFramework already has Console output
            //logConsole = new LogConsole();

            // create the log file
            logFile = new LogFile(file);

            // create the log aut framework
            try
            {
                logAF = new LogAutomationFramework();
            }
            catch
            {
                // it's ok to not create the af log. maybe the machine doesn't have the tools installed
            }
        }