mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-16 16:37:48 +01:00
Minor logger changes
This commit is contained in:
@@ -124,7 +124,6 @@ namespace Flowframes
|
|||||||
if (Path.GetExtension(filename) != ".txt")
|
if (Path.GetExtension(filename) != ".txt")
|
||||||
filename = Path.ChangeExtension(filename, "txt");
|
filename = Path.ChangeExtension(filename, "txt");
|
||||||
|
|
||||||
file = Path.Combine(Paths.GetLogPath(), filename);
|
|
||||||
logStr = logStr.Replace(Environment.NewLine, " ").TrimWhitespaces();
|
logStr = logStr.Replace(Environment.NewLine, " ").TrimWhitespaces();
|
||||||
string time = DateTime.Now.ToString("MM-dd-yyyy HH:mm:ss");
|
string time = DateTime.Now.ToString("MM-dd-yyyy HH:mm:ss");
|
||||||
|
|
||||||
@@ -139,6 +138,7 @@ namespace Flowframes
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
file = Path.Combine(Paths.GetLogPath(), filename);
|
||||||
File.AppendAllText(file, appendStr);
|
File.AppendAllText(file, appendStr);
|
||||||
id++;
|
id++;
|
||||||
break;
|
break;
|
||||||
@@ -181,12 +181,11 @@ namespace Flowframes
|
|||||||
if (Path.GetExtension(filename) != ".txt")
|
if (Path.GetExtension(filename) != ".txt")
|
||||||
filename = Path.ChangeExtension(filename, "txt");
|
filename = Path.ChangeExtension(filename, "txt");
|
||||||
|
|
||||||
file = Path.Combine(Paths.GetLogPath(), filename);
|
|
||||||
|
|
||||||
string time = DT.Now.Month + "-" + DT.Now.Day + "-" + DT.Now.Year + " " + DT.Now.Hour + ":" + DT.Now.Minute + ":" + DT.Now.Second;
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
file = Path.Combine(Paths.GetLogPath(), filename);
|
||||||
|
string time = DT.Now.Month + "-" + DT.Now.Day + "-" + DT.Now.Year + " " + DT.Now.Hour + ":" + DT.Now.Minute + ":" + DT.Now.Second;
|
||||||
|
|
||||||
if (append)
|
if (append)
|
||||||
File.AppendAllText(file, Environment.NewLine + time + ":" + Environment.NewLine + content);
|
File.AppendAllText(file, Environment.NewLine + time + ":" + Environment.NewLine + content);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user