summaryrefslogtreecommitdiff
path: root/plugins/Quotes/src/Log.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <Mataes2007@gmail.com>2018-07-25 09:14:43 +0300
committerKirill Volinsky <Mataes2007@gmail.com>2018-07-25 09:14:43 +0300
commit23729c4f6a62de7a71368ffdeeeb08470ff4731e (patch)
tree3b227636ac19cb7b1f200b52aec1121593713e4d /plugins/Quotes/src/Log.cpp
parente62d2a2a86b0477537403a2316e629e8fea4a9d0 (diff)
Quotes renamed to CurrencyRates
Diffstat (limited to 'plugins/Quotes/src/Log.cpp')
-rw-r--r--plugins/Quotes/src/Log.cpp41
1 files changed, 0 insertions, 41 deletions
diff --git a/plugins/Quotes/src/Log.cpp b/plugins/Quotes/src/Log.cpp
deleted file mode 100644
index f3a038d2a7..0000000000
--- a/plugins/Quotes/src/Log.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-#include "StdAfx.h"
-
-namespace
-{
- mir_cs g_Mutex;
-
- tstring get_log_file_name()
- {
- return CreateFilePath(L"Quotes.log");
- }
-
- bool is_log_enabled()
- {
-#ifdef _DEBUG
- return true;
-#else
- return (1 == db_get_b(NULL, QUOTES_PROTOCOL_NAME, DB_STR_ENABLE_LOG, false));
-#endif
- }
-
- void do_log(const tstring& rsFileName, const tstring& rsMsg)
- {
- mir_cslock lck(g_Mutex);
- tofstream file(rsFileName.c_str(), std::ios::ate | std::ios::app);
- if (file.good())
- {
- wchar_t szTime[20];
- _tstrtime_s(szTime);
- file << szTime << L" ================================>\n" << rsMsg << L"\n\n";
- }
- }
-}
-
-void LogIt(const tstring& rsMsg)
-{
- if (is_log_enabled())
- {
- tstring sFileName = get_log_file_name();
- do_log(sFileName, rsMsg);
- }
-}