public static void Write(string message) //Write to the same line. { var logLine = new Logger.logFile(); Console.Write(message); logLine.log(message, "Output"); }
//An integrated alternative to "Console.Write" which includs logging. public static void writeOut(string message) //Writes to a new line { var logLine = new Logger.logFile(); Console.WriteLine(message); logLine.log(message, "Output"); //And logs the message }
static void Main(string[] args) { UserInput input = new UserInput(); CommandParse commandParse = new CommandParse(); var logLine = new Logger.logFile(); //Instantiate the loggin class, as we have an input present. Setup.Start(); //Call one-time run setup class to make the console pretty. while (true) { string command = input.In(); //Take the user's input logLine.log(command, "Input"); //Log it commandParse.parse(command); //And decide the action to take } }