mirror of
https://github.com/n00mkrad/flowframes.git
synced 2026-09-01 19:51:28 +02:00
Remove linebreaks from log file entires
This commit is contained in:
@@ -251,7 +251,7 @@
|
||||
<Compile Include="IO\Formats.cs" />
|
||||
<Compile Include="IO\IOUtils.cs" />
|
||||
<Compile Include="IO\Paths.cs" />
|
||||
<Compile Include="Logger.cs" />
|
||||
<Compile Include="IO\Logger.cs" />
|
||||
<Compile Include="Magick\Converter.cs" />
|
||||
<Compile Include="Magick\MagickDedupe.cs" />
|
||||
<Compile Include="OS\NvApi.cs" />
|
||||
|
||||
@@ -38,21 +38,21 @@ namespace Flowframes
|
||||
LogToFile(s, false, filename);
|
||||
}
|
||||
|
||||
public static void LogToFile(string s, bool noLineBreak, string filename)
|
||||
public static void LogToFile(string logStr, bool noLineBreak, string filename)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(filename))
|
||||
filename = defaultLogName;
|
||||
|
||||
file = Path.Combine(Paths.GetLogPath(), filename);
|
||||
|
||||
logStr = logStr.Replace(Environment.NewLine, " | ");
|
||||
string time = DT.Now.Month + "-" + DT.Now.Day + "-" + DT.Now.Year + " " + DT.Now.Hour + ":" + DT.Now.Minute + ":" + DT.Now.Second;
|
||||
|
||||
try
|
||||
{
|
||||
if (!noLineBreak)
|
||||
File.AppendAllText(file, Environment.NewLine + time + ": " + s);
|
||||
File.AppendAllText(file, Environment.NewLine + time + ": " + logStr);
|
||||
else
|
||||
File.AppendAllText(file, " " + s);
|
||||
File.AppendAllText(file, " " + logStr);
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -23,10 +23,6 @@ namespace Flowframes
|
||||
Application.Exit();
|
||||
//new InstallerForm().ShowDialog();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +39,7 @@ namespace Flowframes
|
||||
// if pkg is required and not installed, return false
|
||||
if (pkg.friendlyName.ToLower().Contains("required") && !PkgUtils.IsInstalled(pkg))
|
||||
{
|
||||
Logger.Log($"Required packages \"{pkg.friendlyName}\" was not found!", true);
|
||||
Logger.Log($"Required package \"{pkg.friendlyName}\" was not found!", true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user