File tree Expand file tree Collapse file tree 4 files changed +1
-56
lines changed
Expand file tree Collapse file tree 4 files changed +1
-56
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ set(CMAKE_CXX_STANDARD 11)
55
66add_library (crud-lib
77 src/AppComponent.hpp
8- src/Logger.hpp
98 src/SwaggerComponent.hpp
109 src/controller/UserController.hpp
1110 src/db/Database.cpp
Original file line number Diff line number Diff line change 88
99#include " ./controller/UserController.hpp"
1010#include " ./AppComponent.hpp"
11- #include " ./Logger.hpp"
1211
1312#include " oatpp-swagger/Controller.hpp"
1413#include " oatpp/network/server/Server.hpp"
@@ -53,14 +52,11 @@ void run() {
5352 * main
5453 */
5554int main (int argc, const char * argv[]) {
56-
57- oatpp::base::Environment::setLogger (new Logger ());
55+
5856 oatpp::base::Environment::init ();
5957
6058 run ();
6159
62- oatpp::base::Environment::setLogger (nullptr ); // /< free Logger
63-
6460 /* Print how much objects were created during app running, and what have left-probably leaked */
6561 /* Disable object counting for release builds using '-D OATPP_DISABLE_ENV_OBJECT_COUNTERS' flag for better performance */
6662 std::cout << " \n Environment:\n " ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1010
1111namespace {
1212
13- class Logger : public oatpp ::base::Logger {
14- private:
15- oatpp::concurrency::SpinLock m_lock;
16- public:
17-
18- void log (v_int32 priority, const std::string& tag, const std::string& message) override {
19- std::lock_guard<oatpp::concurrency::SpinLock> lock (m_lock);
20- std::cout << tag << " :" << message << " \n " ;
21- }
22-
23- };
24-
2513class Test : public oatpp ::test::UnitTest {
2614public:
2715 Test () : oatpp::test::UnitTest(" MyTag" )
@@ -45,13 +33,9 @@ void runTests() {
4533int main () {
4634
4735 oatpp::base::Environment::init ();
48- oatpp::base::Environment::setLogger (new Logger ());
4936
5037 runTests ();
5138
52- oatpp::base::Environment::setLogger (nullptr );
53- oatpp::base::Environment::destroy ();
54-
5539 /* Print how much objects were created during app running, and what have left-probably leaked */
5640 /* Disable object counting for release builds using '-D OATPP_DISABLE_ENV_OBJECT_COUNTERS' flag for better performance */
5741 std::cout << " \n Environment:\n " ;
You can’t perform that action at this time.
0 commit comments