Adf.Base.Logging.FlatFileLogProvider.FlatFileLogProvider C# (CSharp) Method

FlatFileLogProvider() public method

Initializes a new instance of the FlatFileLogProvider class with no argument. Note that the logfile path should be mentioned in web.config file key="FlatFileLogPath" before initializing the object.
public FlatFileLogProvider ( ) : System
return System
        public FlatFileLogProvider()
        {
            if (StateManager.Settings.Has("FlatFileLogPath"))
            {
                logFilePath =
                    Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
                                 StateManager.Settings["FlatFileLogPath"].ToString());

                //logFilePath = Path.Combine(System.Environment.CurrentDirectory,
                //                 StateManager.Settings["FlatFileLogPath"].ToString());

            }
            else
            {
                logFilePath = Path.GetTempPath();
            }

            string fileName = StateManager.Settings.Has("ApplicationName") ? StateManager.Settings["ApplicationName"] as string : "ADF";

            logFileName = string.Format(CultureInfo.InvariantCulture, @"{0}_{1}.log", fileName, GetDateForFilename());

            if (!string.IsNullOrEmpty(logFilePath))
            {
                logFilePath = Path.Combine(logFilePath, logFileName);
            }
        }