[longomatch] Show version and OS in the error logs



commit ad0dcfb0c5d62f006ffe3e1a0a63abd76b738064
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Tue Apr 2 21:01:48 2013 +0200

    Show version and OS in the error logs

 LongoMatch.Core/LongoMatch.Core.mdp |    1 +
 LongoMatch.Core/Makefile.am         |    1 +
 LongoMatch/Main.cs                  |    5 +++--
 3 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/LongoMatch.Core/LongoMatch.Core.mdp b/LongoMatch.Core/LongoMatch.Core.mdp
index 4b2069f..85cd900 100644
--- a/LongoMatch.Core/LongoMatch.Core.mdp
+++ b/LongoMatch.Core/LongoMatch.Core.mdp
@@ -102,6 +102,7 @@
     <File subtype="Code" buildaction="Compile" name="Interfaces/Multimedia/IRemuxer.cs" />
     <File subtype="Code" buildaction="Compile" name="Common/Coordinates.cs" />
     <File subtype="Code" buildaction="Compile" name="Interfaces/Multimedia/IVideoConverter.cs" />
+    <File subtype="Code" buildaction="Compile" name="Common/SysInfo.cs" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="System, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089" />
diff --git a/LongoMatch.Core/Makefile.am b/LongoMatch.Core/Makefile.am
index a43c870..2d9cb04 100644
--- a/LongoMatch.Core/Makefile.am
+++ b/LongoMatch.Core/Makefile.am
@@ -20,6 +20,7 @@ SOURCES = \
        Common/PlayList.cs \
        Common/PlaysFilter.cs \
        Common/SerializableObject.cs \
+       Common/SysInfo.cs \
        Common/VideoStandards.cs \
        Config.cs \
        Handlers/Handlers.cs \
diff --git a/LongoMatch/Main.cs b/LongoMatch/Main.cs
index f70b0b7..58e9d6e 100644
--- a/LongoMatch/Main.cs
+++ b/LongoMatch/Main.cs
@@ -84,10 +84,11 @@ namespace LongoMatch
                        logFile = logFile.Replace(":","-");
                        logFile = System.IO.Path.Combine(Config.HomeDir(),logFile);
 
+                       message = SysInfo.PrintInfo(Assembly.GetExecutingAssembly().GetName().Version);
                        if(ex.InnerException != null)
-                               message = 
String.Format("{0}\n{1}\n{2}\n{3}\n{4}",ex.Message,ex.InnerException.Message,ex.Source,ex.StackTrace,ex.InnerException.StackTrace);
+                               message += 
String.Format("{0}\n{1}\n{2}\n{3}\n{4}",ex.Message,ex.InnerException.Message,ex.Source,ex.StackTrace,ex.InnerException.StackTrace);
                        else
-                               message = String.Format("{0}\n{1}\n{2}",ex.Message,ex.Source,ex.StackTrace);
+                               message += String.Format("{0}\n{1}\n{2}",ex.Message,ex.Source,ex.StackTrace);
 
                        using(StreamWriter s = new StreamWriter(logFile)) {
                                s.WriteLine(message);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]