main
 1using System.IO;
 2using Gorilla.Commons.Infrastructure.Reflection;
 3using momoney.service.infrastructure.logging;
 4
 5namespace MoMoney.Service.Infrastructure.Logging
 6{
 7    public class LogFileTasks : ILogFileTasks
 8    {
 9        public string get_the_contents_of_the_log_file()
10        {
11            using (
12                var file_stream = new FileStream(get_the_path_to_the_log_file(), FileMode.Open, FileAccess.Read,
13                                                 FileShare.ReadWrite))
14            {
15                using (var reader = new StreamReader(file_stream))
16                {
17                    return reader.ReadToEnd();
18                }
19            }
20        }
21
22        public string get_the_path_to_the_log_file()
23        {
24            return Path.Combine(this.startup_directory(), @"logs\log.txt");
25        }
26    }
27}