mirror of
https://github.com/sp-tarkov/patcher.git
synced 2025-02-12 16:50:45 -05:00
add os info to logs
This commit is contained in:
parent
400372a21f
commit
c959a8900c
@ -4,8 +4,8 @@
|
|||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
|
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<AssemblyVersion>2.9.1</AssemblyVersion>
|
<AssemblyVersion>2.9.2</AssemblyVersion>
|
||||||
<FileVersion>2.9.1</FileVersion>
|
<FileVersion>2.9.2</FileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AvaloniaResource Include="Assets\**" />
|
<AvaloniaResource Include="Assets\**" />
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
|
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<AssemblyVersion>2.9.1</AssemblyVersion>
|
<AssemblyVersion>2.9.2</AssemblyVersion>
|
||||||
<FileVersion>2.9.1</FileVersion>
|
<FileVersion>2.9.2</FileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<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;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace PatcherUtils.Model
|
namespace PatcherUtils.Model
|
||||||
{
|
{
|
||||||
@ -23,6 +24,24 @@ namespace PatcherUtils.Model
|
|||||||
return DateTime.Now.ToString("MM/dd/yyyy - hh:mm:ss tt]");
|
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 LogInfo(string message) => LogToFile($"{GetTimestamp()}[INFO]: {message}");
|
||||||
public static void LogError(string message) => LogToFile($"{GetTimestamp()}[ERROR]: {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}");
|
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.LogInfo("::: Starting patch application :::");
|
||||||
|
|
||||||
|
PatchLogger.LogOSInfo();
|
||||||
|
|
||||||
//get needed directory information
|
//get needed directory information
|
||||||
DirectoryInfo sourceDir = new DirectoryInfo(SourceFolder);
|
DirectoryInfo sourceDir = new DirectoryInfo(SourceFolder);
|
||||||
DirectoryInfo deltaDir = new DirectoryInfo(DeltaFolder);
|
DirectoryInfo deltaDir = new DirectoryInfo(DeltaFolder);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user