ARCed.Core.Logger.Save C# (CSharp) Method

Save() public method

Saves the log file to disk
public Save ( string filename, bool flushBuffer ) : void
filename string FullPath where log is saved
flushBuffer bool Flag to clear the buffer after saving
return void
        public void Save(string filename, bool flushBuffer)
        {
            bool result;
            try
            {
                File.WriteAllText(filename, this._buffer.ToString(), Encoding.UTF8);
                if (flushBuffer)
                    this._buffer.Clear();
                result = true;
            }
            catch { result = false; }
            if (this.OnSave != null)
                this.OnSave(this, new LogSaveEventArgs(filename, result, flushBuffer));
        }