mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Write remote information in dump log.
This commit is contained in:
@@ -36,7 +36,6 @@ using System.Reflection;
|
|||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using DiscImageChef.CommonTypes.Interop;
|
using DiscImageChef.CommonTypes.Interop;
|
||||||
using DiscImageChef.Devices;
|
using DiscImageChef.Devices;
|
||||||
using PlatformID = DiscImageChef.CommonTypes.Interop.PlatformID;
|
|
||||||
using Version = DiscImageChef.CommonTypes.Interop.Version;
|
using Version = DiscImageChef.CommonTypes.Interop.Version;
|
||||||
|
|
||||||
namespace DiscImageChef.Core.Logging
|
namespace DiscImageChef.Core.Logging
|
||||||
@@ -46,7 +45,7 @@ namespace DiscImageChef.Core.Logging
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class DumpLog
|
public class DumpLog
|
||||||
{
|
{
|
||||||
readonly StreamWriter logSw;
|
private readonly StreamWriter logSw;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes the dump log
|
/// Initializes the dump log
|
||||||
@@ -61,9 +60,9 @@ namespace DiscImageChef.Core.Logging
|
|||||||
|
|
||||||
logSw.WriteLine("Start logging at {0}", DateTime.Now);
|
logSw.WriteLine("Start logging at {0}", DateTime.Now);
|
||||||
|
|
||||||
PlatformID platId = DetectOS.GetRealPlatformID();
|
var platId = DetectOS.GetRealPlatformID();
|
||||||
string platVer = DetectOS.GetVersion();
|
var platVer = DetectOS.GetVersion();
|
||||||
AssemblyInformationalVersionAttribute assemblyVersion =
|
var assemblyVersion =
|
||||||
Attribute.GetCustomAttribute(typeof(DumpLog).Assembly, typeof(AssemblyInformationalVersionAttribute)) as
|
Attribute.GetCustomAttribute(typeof(DumpLog).Assembly, typeof(AssemblyInformationalVersionAttribute)) as
|
||||||
AssemblyInformationalVersionAttribute;
|
AssemblyInformationalVersionAttribute;
|
||||||
|
|
||||||
@@ -85,6 +84,18 @@ namespace DiscImageChef.Core.Logging
|
|||||||
logSw.WriteLine("Command line: {0}", Environment.CommandLine);
|
logSw.WriteLine("Command line: {0}", Environment.CommandLine);
|
||||||
logSw.WriteLine();
|
logSw.WriteLine();
|
||||||
|
|
||||||
|
if (dev.IsRemote)
|
||||||
|
{
|
||||||
|
logSw.WriteLine("################# Remote information #################");
|
||||||
|
logSw.WriteLine("Server: {0}", dev.RemoteApplication);
|
||||||
|
logSw.WriteLine("Version: {0}", dev.RemoteVersion);
|
||||||
|
logSw.WriteLine("Operating system: {0} {1}", dev.RemoteOperatingSystem,
|
||||||
|
dev.RemoteOperatingSystemVersion);
|
||||||
|
logSw.WriteLine("Architecture: {0}", dev.RemoteArchitecture);
|
||||||
|
logSw.WriteLine("Protocol version: {0}", dev.RemoteProtocolVersion);
|
||||||
|
logSw.WriteLine("######################################################");
|
||||||
|
}
|
||||||
|
|
||||||
logSw.WriteLine("################# Device information #################");
|
logSw.WriteLine("################# Device information #################");
|
||||||
logSw.WriteLine("Manufacturer: {0}", dev.Manufacturer);
|
logSw.WriteLine("Manufacturer: {0}", dev.Manufacturer);
|
||||||
logSw.WriteLine("Model: {0}", dev.Model);
|
logSw.WriteLine("Model: {0}", dev.Model);
|
||||||
@@ -114,7 +125,6 @@ namespace DiscImageChef.Core.Logging
|
|||||||
logSw.WriteLine("FireWire product ID: 0x{0:X8}", dev.FireWireModel);
|
logSw.WriteLine("FireWire product ID: 0x{0:X8}", dev.FireWireModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
logSw.WriteLine();
|
|
||||||
logSw.WriteLine("######################################################");
|
logSw.WriteLine("######################################################");
|
||||||
|
|
||||||
logSw.WriteLine();
|
logSw.WriteLine();
|
||||||
@@ -131,7 +141,7 @@ namespace DiscImageChef.Core.Logging
|
|||||||
{
|
{
|
||||||
if (logSw == null) return;
|
if (logSw == null) return;
|
||||||
|
|
||||||
string text = string.Format(format, args);
|
var text = string.Format(format, args);
|
||||||
logSw.WriteLine("{0:s} {1}", DateTime.Now, text);
|
logSw.WriteLine("{0:s} {1}", DateTime.Now, text);
|
||||||
logSw.Flush();
|
logSw.Flush();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -219,5 +219,13 @@ namespace DiscImageChef.Devices
|
|||||||
public byte[] Cis { get; }
|
public byte[] Cis { get; }
|
||||||
|
|
||||||
private readonly Remote.Remote remote;
|
private readonly Remote.Remote remote;
|
||||||
|
|
||||||
|
public bool IsRemote => remote != null;
|
||||||
|
public string RemoteApplication => remote?.ServerApplication;
|
||||||
|
public string RemoteVersion => remote?.ServerVersion;
|
||||||
|
public string RemoteOperatingSystem => remote?.ServerOperatingSystem;
|
||||||
|
public string RemoteOperatingSystemVersion => remote?.ServerOperatingSystemVersion;
|
||||||
|
public string RemoteArchitecture => remote?.ServerArchitecture;
|
||||||
|
public int RemoteProtocolVersion => remote?.ServerProtocolVersion ?? 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user