--- /dev/null
+/* Logging.cs $\r
+ This file is part of the HandBrake source code.\r
+ Homepage: <http://handbrake.fr>.\r
+ It may be used under the terms of the GNU General Public License. */\r
+\r
+namespace HandBrake.ApplicationServices.Functions\r
+{\r
+ using System;\r
+ using System.IO;\r
+ using System.Text;\r
+ using System.Windows.Forms;\r
+\r
+ using HandBrake.ApplicationServices.Model;\r
+\r
+ /// <summary>\r
+ /// The System Information.\r
+ /// </summary>\r
+ public class Logging\r
+ {\r
+ /// <summary>\r
+ /// Add the CLI Query to the Log File.\r
+ /// </summary>\r
+ /// <param name="encJob">\r
+ /// The Encode Job Object\r
+ /// </param>\r
+ /// <returns>\r
+ /// The create cli log header.\r
+ /// </returns>\r
+ public static string CreateCliLogHeader(Job encJob)\r
+ {\r
+ StringBuilder logHeader = new StringBuilder();\r
+\r
+ logHeader.AppendLine(String.Format("# {0}", Init.HandBrakeGuiVersionString));\r
+ logHeader.AppendLine(String.Format("# Running: {0}", Environment.OSVersion));\r
+ logHeader.AppendLine(String.Format("# CPU: {0}", SystemInfo.GetCpuCount));\r
+ logHeader.AppendLine(String.Format("# Ram: {0} MB", SystemInfo.TotalPhysicalMemory));\r
+ logHeader.AppendLine(String.Format("# Screen: {0}x{1}", SystemInfo.ScreenBounds.Bounds.Width, SystemInfo.ScreenBounds.Bounds.Height));\r
+ logHeader.AppendLine(String.Format("# Temp Dir: {0}", Path.GetTempPath()));\r
+ logHeader.AppendLine(String.Format("# Install Dir: {0}", Application.StartupPath));\r
+ logHeader.AppendLine(String.Format("# Data Dir: {0}\n", Application.UserAppDataPath));\r
+\r
+ if (encJob != null)\r
+ {\r
+ logHeader.AppendLine(String.Format("# CLI Query: {0}", encJob.Query));\r
+ logHeader.AppendLine(String.Format("# User Query: {0}", encJob.CustomQuery));\r
+ }\r
+ logHeader.AppendLine("-------------------------------------------");\r
+\r
+ return logHeader.ToString();\r
+ }\r
+ }\r
+}
\ No newline at end of file