diff options
author | eportnov <eportnov@ibs.ru> | 2022-09-14 10:38:10 +0300 |
---|---|---|
committer | eportnov <eportnov@ibs.ru> | 2022-09-14 11:26:13 +0300 |
commit | 741ca6031fbb6228a4a5294878afe14c0bdefa7f (patch) | |
tree | bae71c1afc33d9ff0671ee29652db9c9ee04772e /src/file/mail.cpp | |
parent | a78e04585b2d4097a88ab681c1beebe8fe9586a1 (diff) | |
parent | 65425017d48dd7228d0c403cd779561b22a8d6e3 (diff) | |
download | obmc-sila-smtp-741ca6031fbb6228a4a5294878afe14c0bdefa7f.tar.xz |
Merge branch 'feature/logger'
Diffstat (limited to 'src/file/mail.cpp')
-rw-r--r-- | src/file/mail.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/file/mail.cpp b/src/file/mail.cpp index 1516880..96d760b 100644 --- a/src/file/mail.cpp +++ b/src/file/mail.cpp @@ -1,6 +1,7 @@ #include <fstream> #include "mail.hpp" +#include "managment/logger.hpp" namespace smtp::file { @@ -14,8 +15,8 @@ namespace smtp::file std::ifstream mail_file{ mPathFile, std::fstream::in }; if ( !mail_file.is_open() ) { - //TODO new file - // std::cerr << "Failed to open pcie_devices database \n"; + manage::Logger::LogError( "Unable to open file to read " + mPathFile ); + return {}; } std::string line{}; manage::MailsSet result; @@ -37,8 +38,7 @@ namespace smtp::file std::ofstream mail_file{ mPathFile, std::fstream::out | std::fstream::trunc }; if ( !mail_file.is_open() ) { - //TODO new file - // std::cerr << "Failed to open pcie_devices database \n"; + manage::Logger::LogError( "Unable to open file to write " + mPathFile ); return false; } for( const auto& pair : data ) |