Hamekoz.Data.DB.RegistrarError C# (CSharp) Method

RegistrarError() static private method

Registrar los errores generados al intentar realizar las consultas.
static private RegistrarError ( Exception error ) : void
error System.Exception
return void
        static void RegistrarError(Exception error)
        {
            System.IO.StreamWriter w = System.IO.File.AppendText ("DBNet.log");
            w.Write ("\r\nRegistro de error: ");
            w.WriteLine ("{0} {1}", DateTime.Now.ToShortDateString (), DateTime.Now.ToShortTimeString ());
            w.WriteLine ("Message: {0}", error.Message);
            w.WriteLine ("Source: {0}", error.Source);
            w.WriteLine ("StackTrace:");
            w.WriteLine (error.StackTrace);
            w.WriteLine ("-------------------------------");
            w.Flush ();
            w.Close ();
        }