Skip to content

Commit

Permalink
Log Path and FileName changed
Browse files Browse the repository at this point in the history
Now there is a log filename for day, into a LOG sub-path
  • Loading branch information
ginopc committed May 19, 2015
1 parent d10bdab commit b26489b
Show file tree
Hide file tree
Showing 8 changed files with 157 additions and 182 deletions.
2 changes: 1 addition & 1 deletion Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("0.0.8.*")]
[assembly: AssemblyVersion("0.0.9.*")]

// Below attribute is to suppress FxCop warning "CA2232 : Microsoft.Usage : Add STAThreadAttribute to assembly"
// as Device app does not support STA thread.
Expand Down
50 changes: 0 additions & 50 deletions SelfDC-Generic.sln

This file was deleted.

2 changes: 1 addition & 1 deletion SelfDC.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<PlatformID>E2BECB1F-8C8C-41ba-B736-9BE7D946A398</PlatformID>
<OSVersion>5.00</OSVersion>
<DeployDirSuffix>SelfDC</DeployDirSuffix>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<NativePlatformName>Windows CE</NativePlatformName>
<FormFactorID>
</FormFactorID>
Expand Down
9 changes: 7 additions & 2 deletions Utils/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@ public static class ScsUtils
/// <param name="logMsg"></param>
public static void WriteLog(string logMsg)
{
StreamWriter sw = new StreamWriter(GetAppPath() + "\\" + GetAppAssemblyName() + "_log.txt", true);
sw.WriteLine("{0:yyyy-MM-dd HH:mm:ss}: {1}", DateTime.Now, logMsg);
string LogPath = string.Format("{0}\\LOG", GetAppPath());
string LogFileName = string.Format("{0}\\{1}_log-{2:yyyyMMdd}.txt", LogPath, GetAppAssemblyName(), DateTime.Now);

if (!Directory.Exists(LogPath))
Directory.CreateDirectory(LogPath);
StreamWriter sw = new StreamWriter(LogFileName, true);
sw.WriteLine("{0:HH:mm:ss}: {1}", DateTime.Now, logMsg);
sw.Close();
}

Expand Down
1 change: 1 addition & 0 deletions Views/InventoryForm.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Views/LabelsForm.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b26489b

Please sign in to comment.