mirror of
https://github.com/sp-tarkov/patcher.git
synced 2025-02-12 17:30:44 -05:00
add os info to logs
This commit is contained in:
parent
400372a21f
commit
c959a8900c
@ -4,8 +4,8 @@
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
|
||||
<Nullable>enable</Nullable>
|
||||
<AssemblyVersion>2.9.1</AssemblyVersion>
|
||||
<FileVersion>2.9.1</FileVersion>
|
||||
<AssemblyVersion>2.9.2</AssemblyVersion>
|
||||
<FileVersion>2.9.2</FileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<AvaloniaResource Include="Assets\**" />
|
||||
|
@ -4,8 +4,8 @@
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
|
||||
<Nullable>enable</Nullable>
|
||||
<AssemblyVersion>2.9.1</AssemblyVersion>
|
||||
<FileVersion>2.9.1</FileVersion>
|
||||
<AssemblyVersion>2.9.2</AssemblyVersion>
|
||||
<FileVersion>2.9.2</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
BIN
Patcher/PatchGenerator/Resources/PatchClient.exe
(Stored with Git LFS)
BIN
Patcher/PatchGenerator/Resources/PatchClient.exe
(Stored with Git LFS)
Binary file not shown.
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace PatcherUtils.Model
|
||||
{
|
||||
@ -23,6 +24,24 @@ namespace PatcherUtils.Model
|
||||
return DateTime.Now.ToString("MM/dd/yyyy - hh:mm:ss tt]");
|
||||
}
|
||||
|
||||
public static void LogOSInfo()
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
LogToFile($"{GetTimestamp()}[OS]: Windows");
|
||||
|
||||
if(RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||
LogToFile($"{GetTimestamp()}[OS]: Linux");
|
||||
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
||||
LogToFile($"{GetTimestamp()}[OS]: OSX");
|
||||
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.FreeBSD))
|
||||
LogToFile($"{GetTimestamp()}[OS]: FreeBSD");
|
||||
|
||||
|
||||
LogToFile($"{GetTimestamp()}[OS]: {RuntimeInformation.OSDescription}");
|
||||
}
|
||||
|
||||
public static void LogInfo(string message) => LogToFile($"{GetTimestamp()}[INFO]: {message}");
|
||||
public static void LogError(string message) => LogToFile($"{GetTimestamp()}[ERROR]: {message}");
|
||||
public static void LogException(Exception ex) => LogToFile($"{GetTimestamp()}[EXCEPTION]: {ex.Message}\n\nStackTrace:\n{ex.StackTrace}");
|
||||
|
@ -374,6 +374,8 @@ namespace PatcherUtils
|
||||
{
|
||||
PatchLogger.LogInfo("::: Starting patch application :::");
|
||||
|
||||
PatchLogger.LogOSInfo();
|
||||
|
||||
//get needed directory information
|
||||
DirectoryInfo sourceDir = new DirectoryInfo(SourceFolder);
|
||||
DirectoryInfo deltaDir = new DirectoryInfo(DeltaFolder);
|
||||
|
Loading…
x
Reference in New Issue
Block a user