commit 6ff5e69fa9bee751cf72c8050ce5b53f6ce94230 Author: NanamiAdmin Date: Tue Aug 19 16:50:37 2025 +0800 initial commit diff --git a/.vs/Logger/CopilotIndices/17.14.995.13737/CodeChunks.db b/.vs/Logger/CopilotIndices/17.14.995.13737/CodeChunks.db new file mode 100644 index 0000000..96085af Binary files /dev/null and b/.vs/Logger/CopilotIndices/17.14.995.13737/CodeChunks.db differ diff --git a/.vs/Logger/CopilotIndices/17.14.995.13737/SemanticSymbols.db b/.vs/Logger/CopilotIndices/17.14.995.13737/SemanticSymbols.db new file mode 100644 index 0000000..f62ba63 Binary files /dev/null and b/.vs/Logger/CopilotIndices/17.14.995.13737/SemanticSymbols.db differ diff --git a/.vs/Logger/FileContentIndex/cab10dde-f0c7-48c8-ad50-b2d43c95e9db.vsidx b/.vs/Logger/FileContentIndex/cab10dde-f0c7-48c8-ad50-b2d43c95e9db.vsidx new file mode 100644 index 0000000..a32ffb8 Binary files /dev/null and b/.vs/Logger/FileContentIndex/cab10dde-f0c7-48c8-ad50-b2d43c95e9db.vsidx differ diff --git a/.vs/Logger/copilot-chat/88bfd955/sessions/c7804664-75c8-4c15-a7b4-f4f30068d38c b/.vs/Logger/copilot-chat/88bfd955/sessions/c7804664-75c8-4c15-a7b4-f4f30068d38c new file mode 100644 index 0000000..db5e26d Binary files /dev/null and b/.vs/Logger/copilot-chat/88bfd955/sessions/c7804664-75c8-4c15-a7b4-f4f30068d38c differ diff --git a/.vs/Logger/v17/.suo b/.vs/Logger/v17/.suo new file mode 100644 index 0000000..86d60cb Binary files /dev/null and b/.vs/Logger/v17/.suo differ diff --git a/.vs/Logger/v17/Browse.VC.db b/.vs/Logger/v17/Browse.VC.db new file mode 100644 index 0000000..ab0fb1a Binary files /dev/null and b/.vs/Logger/v17/Browse.VC.db differ diff --git a/.vs/Logger/v17/DocumentLayout.backup.json b/.vs/Logger/v17/DocumentLayout.backup.json new file mode 100644 index 0000000..b20b149 --- /dev/null +++ b/.vs/Logger/v17/DocumentLayout.backup.json @@ -0,0 +1,37 @@ +{ + "Version": 1, + "WorkspaceRootPath": "F:\\Codes\\C\u002B\u002B\\Logger\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{A5E588FD-FFA1-40EC-AC4E-AD3B2C3B89C0}|Logger.vcxproj|F:\\Codes\\C\u002B\u002B\\Logger\\Logger.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", + "RelativeMoniker": "D:0:0:{A5E588FD-FFA1-40EC-AC4E-AD3B2C3B89C0}|Logger.vcxproj|solutionrelative:Logger.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Logger.cpp", + "DocumentMoniker": "F:\\Codes\\C\u002B\u002B\\Logger\\Logger.cpp", + "RelativeDocumentMoniker": "Logger.cpp", + "ToolTip": "F:\\Codes\\C\u002B\u002B\\Logger\\Logger.cpp*", + "RelativeToolTip": "Logger.cpp*", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABAAAAACAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", + "WhenOpened": "2025-08-19T04:36:46.727Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/.vs/Logger/v17/DocumentLayout.json b/.vs/Logger/v17/DocumentLayout.json new file mode 100644 index 0000000..f78bcfe --- /dev/null +++ b/.vs/Logger/v17/DocumentLayout.json @@ -0,0 +1,37 @@ +{ + "Version": 1, + "WorkspaceRootPath": "F:\\Codes\\C\u002B\u002B\\Logger\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{A5E588FD-FFA1-40EC-AC4E-AD3B2C3B89C0}|Logger.vcxproj|F:\\Codes\\C\u002B\u002B\\Logger\\Logger.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}", + "RelativeMoniker": "D:0:0:{A5E588FD-FFA1-40EC-AC4E-AD3B2C3B89C0}|Logger.vcxproj|solutionrelative:Logger.cpp||{D0E1A5C6-B359-4E41-9B60-3365922C2A22}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Logger.cpp", + "DocumentMoniker": "F:\\Codes\\C\u002B\u002B\\Logger\\Logger.cpp", + "RelativeDocumentMoniker": "Logger.cpp", + "ToolTip": "F:\\Codes\\C\u002B\u002B\\Logger\\Logger.cpp", + "RelativeToolTip": "Logger.cpp", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAwAAAAZAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000677|", + "WhenOpened": "2025-08-19T04:36:46.727Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/.vs/Logger/v17/Solution.VC.db b/.vs/Logger/v17/Solution.VC.db new file mode 100644 index 0000000..f8ab881 Binary files /dev/null and b/.vs/Logger/v17/Solution.VC.db differ diff --git a/.vs/Logger/v17/ipch/AutoPCH/fd53088fae5a5043/LOGGER.ipch b/.vs/Logger/v17/ipch/AutoPCH/fd53088fae5a5043/LOGGER.ipch new file mode 100644 index 0000000..e7ef635 Binary files /dev/null and b/.vs/Logger/v17/ipch/AutoPCH/fd53088fae5a5043/LOGGER.ipch differ diff --git a/Logger.cpp b/Logger.cpp new file mode 100644 index 0000000..c9cebc2 --- /dev/null +++ b/Logger.cpp @@ -0,0 +1,45 @@ +#include +#include +#include +#include + +using namespace std; + +string timeNow; + +void getSystemTime() { + time_t now = time(0); + tm ltm; + localtime_s(<m, &now); + string sec; + if (ltm.tm_sec < 10) { + sec = "0" + to_string(ltm.tm_sec); + } + timeNow = to_string(ltm.tm_year + 1900) + "-" + + to_string(ltm.tm_mon + 1) + "-" + + to_string(ltm.tm_mday) + " " + + to_string(ltm.tm_hour) + ":" + + to_string(ltm.tm_min) + ":" + + to_string(ltm.tm_sec); + } + +void postLog(int level, const string &message) { + string levelStr; + switch (level) { + case 0: + levelStr = "DEBUG"; + break; + case 1: + levelStr = "INFO"; + break; + case 2: + levelStr = "WARNING"; + break; + case 3: + levelStr = "ERROR"; + break; + default: + levelStr = "UNKNOWN"; + } + cout << "[" << timeNow << " - " << levelStr << "] " << message << endl; +} \ No newline at end of file diff --git a/Logger.sln b/Logger.sln new file mode 100644 index 0000000..a48de1e --- /dev/null +++ b/Logger.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.36408.4 d17.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Logger", "Logger.vcxproj", "{A5E588FD-FFA1-40EC-AC4E-AD3B2C3B89C0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A5E588FD-FFA1-40EC-AC4E-AD3B2C3B89C0}.Debug|x64.ActiveCfg = Debug|x64 + {A5E588FD-FFA1-40EC-AC4E-AD3B2C3B89C0}.Debug|x64.Build.0 = Debug|x64 + {A5E588FD-FFA1-40EC-AC4E-AD3B2C3B89C0}.Debug|x86.ActiveCfg = Debug|Win32 + {A5E588FD-FFA1-40EC-AC4E-AD3B2C3B89C0}.Debug|x86.Build.0 = Debug|Win32 + {A5E588FD-FFA1-40EC-AC4E-AD3B2C3B89C0}.Release|x64.ActiveCfg = Release|x64 + {A5E588FD-FFA1-40EC-AC4E-AD3B2C3B89C0}.Release|x64.Build.0 = Release|x64 + {A5E588FD-FFA1-40EC-AC4E-AD3B2C3B89C0}.Release|x86.ActiveCfg = Release|Win32 + {A5E588FD-FFA1-40EC-AC4E-AD3B2C3B89C0}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {CE7130CB-CE23-48D4-B5AB-5467E89F2E3C} + EndGlobalSection +EndGlobal diff --git a/Logger.vcxproj b/Logger.vcxproj new file mode 100644 index 0000000..3c9e31c --- /dev/null +++ b/Logger.vcxproj @@ -0,0 +1,131 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {a5e588fd-ffa1-40ec-ac4e-ad3b2c3b89c0} + Logger + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + + + + + \ No newline at end of file diff --git a/Logger.vcxproj.filters b/Logger.vcxproj.filters new file mode 100644 index 0000000..388d7aa --- /dev/null +++ b/Logger.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/Logger.vcxproj.user b/Logger.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/Logger.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Logger/x64/Debug/Logger.exe.recipe b/Logger/x64/Debug/Logger.exe.recipe new file mode 100644 index 0000000..7e102e0 --- /dev/null +++ b/Logger/x64/Debug/Logger.exe.recipe @@ -0,0 +1,11 @@ + + + + + F:\Codes\C++\Logger\x64\Debug\Logger.exe + + + + + + \ No newline at end of file diff --git a/Logger/x64/Debug/Logger.ilk b/Logger/x64/Debug/Logger.ilk new file mode 100644 index 0000000..1550814 Binary files /dev/null and b/Logger/x64/Debug/Logger.ilk differ diff --git a/Logger/x64/Debug/Logger.log b/Logger/x64/Debug/Logger.log new file mode 100644 index 0000000..a6c3a26 --- /dev/null +++ b/Logger/x64/Debug/Logger.log @@ -0,0 +1,2 @@ + Logger.cpp + Logger.vcxproj -> F:\Codes\C++\Logger\x64\Debug\Logger.exe diff --git a/Logger/x64/Debug/Logger.obj b/Logger/x64/Debug/Logger.obj new file mode 100644 index 0000000..467f6d8 Binary files /dev/null and b/Logger/x64/Debug/Logger.obj differ diff --git a/Logger/x64/Debug/Logger.tlog/CL.command.1.tlog b/Logger/x64/Debug/Logger.tlog/CL.command.1.tlog new file mode 100644 index 0000000..4b34386 Binary files /dev/null and b/Logger/x64/Debug/Logger.tlog/CL.command.1.tlog differ diff --git a/Logger/x64/Debug/Logger.tlog/CL.read.1.tlog b/Logger/x64/Debug/Logger.tlog/CL.read.1.tlog new file mode 100644 index 0000000..0ec98f1 Binary files /dev/null and b/Logger/x64/Debug/Logger.tlog/CL.read.1.tlog differ diff --git a/Logger/x64/Debug/Logger.tlog/CL.write.1.tlog b/Logger/x64/Debug/Logger.tlog/CL.write.1.tlog new file mode 100644 index 0000000..647e989 Binary files /dev/null and b/Logger/x64/Debug/Logger.tlog/CL.write.1.tlog differ diff --git a/Logger/x64/Debug/Logger.tlog/Cl.items.tlog b/Logger/x64/Debug/Logger.tlog/Cl.items.tlog new file mode 100644 index 0000000..22a29f7 --- /dev/null +++ b/Logger/x64/Debug/Logger.tlog/Cl.items.tlog @@ -0,0 +1 @@ +F:\Codes\C++\Logger\Logger.cpp;F:\Codes\C++\Logger\Logger\x64\Debug\Logger.obj diff --git a/Logger/x64/Debug/Logger.tlog/Logger.lastbuildstate b/Logger/x64/Debug/Logger.tlog/Logger.lastbuildstate new file mode 100644 index 0000000..3f44556 --- /dev/null +++ b/Logger/x64/Debug/Logger.tlog/Logger.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.44.35207:TargetPlatformVersion=10.0.26100.0: +Debug|x64|F:\Codes\C++\Logger\| diff --git a/Logger/x64/Debug/Logger.tlog/link.command.1.tlog b/Logger/x64/Debug/Logger.tlog/link.command.1.tlog new file mode 100644 index 0000000..7c5695f Binary files /dev/null and b/Logger/x64/Debug/Logger.tlog/link.command.1.tlog differ diff --git a/Logger/x64/Debug/Logger.tlog/link.read.1.tlog b/Logger/x64/Debug/Logger.tlog/link.read.1.tlog new file mode 100644 index 0000000..390afcd Binary files /dev/null and b/Logger/x64/Debug/Logger.tlog/link.read.1.tlog differ diff --git a/Logger/x64/Debug/Logger.tlog/link.secondary.1.tlog b/Logger/x64/Debug/Logger.tlog/link.secondary.1.tlog new file mode 100644 index 0000000..63d44e5 --- /dev/null +++ b/Logger/x64/Debug/Logger.tlog/link.secondary.1.tlog @@ -0,0 +1,2 @@ +^F:\CODES\C++\LOGGER\LOGGER\X64\DEBUG\LOGGER.OBJ +F:\Codes\C++\Logger\Logger\x64\Debug\Logger.ilk diff --git a/Logger/x64/Debug/Logger.tlog/link.write.1.tlog b/Logger/x64/Debug/Logger.tlog/link.write.1.tlog new file mode 100644 index 0000000..960ac3b Binary files /dev/null and b/Logger/x64/Debug/Logger.tlog/link.write.1.tlog differ diff --git a/Logger/x64/Debug/vc143.idb b/Logger/x64/Debug/vc143.idb new file mode 100644 index 0000000..a3cec22 Binary files /dev/null and b/Logger/x64/Debug/vc143.idb differ diff --git a/Logger/x64/Debug/vc143.pdb b/Logger/x64/Debug/vc143.pdb new file mode 100644 index 0000000..c50cd52 Binary files /dev/null and b/Logger/x64/Debug/vc143.pdb differ diff --git a/x64/Debug/Logger.exe b/x64/Debug/Logger.exe new file mode 100644 index 0000000..73aa0d8 Binary files /dev/null and b/x64/Debug/Logger.exe differ diff --git a/x64/Debug/Logger.pdb b/x64/Debug/Logger.pdb new file mode 100644 index 0000000..a1d5c2d Binary files /dev/null and b/x64/Debug/Logger.pdb differ