File tree Expand file tree Collapse file tree 7 files changed +13
-60
lines changed Expand file tree Collapse file tree 7 files changed +13
-60
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,7 @@ set(CMAKE_CXX_STANDARD 11)
88
99add_library (${project_name} -lib
1010 src/AppComponent.hpp
11- src/Logger.hpp
12- src/Logger.cpp
11+ src/controller/MyController.cpp
1312 src/controller/MyController.hpp
1413 src/dto/MyDTOs.hpp
1514)
Original file line number Diff line number Diff line change 88
99#include " ./controller/MyController.hpp"
1010#include " ./AppComponent.hpp"
11- #include " ./Logger.hpp"
1211
1312#include " oatpp/network/server/Server.hpp"
1413
@@ -46,14 +45,11 @@ void run() {
4645 * main
4746 */
4847int main (int argc, const char * argv[]) {
49-
50- oatpp::base::Environment::setLogger (new Logger ());
48+
5149 oatpp::base::Environment::init ();
5250
5351 run ();
5452
55- oatpp::base::Environment::setLogger (nullptr ); // /< free Logger
56-
5753 /* Print how much objects were created during app running, and what have left-probably leaked */
5854 /* Disable object counting for release builds using '-D OATPP_DISABLE_ENV_OBJECT_COUNTERS' flag for better performance */
5955 std::cout << " \n Environment:\n " ;
Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ class AppComponent {
2929 */
3030 OATPP_CREATE_COMPONENT (std::shared_ptr<oatpp::async::Executor>, executor)([] {
3131 return std::make_shared<oatpp::async::Executor>(
32- 4 /* Data-Processing threads */ ,
33- 1 /* I/O threads */ ,
32+ 9 /* Data-Processing threads */ ,
33+ 2 /* I/O threads */ ,
3434 1 /* Timer threads */
3535 );
3636 }());
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ //
2+ // Created by Leonid on 2019-05-27.
3+ //
4+
5+ #include " MyController.hpp"
6+
7+ // TODO some code here
Original file line number Diff line number Diff line change 11
2- #include " Logger.hpp"
3-
42#include " oatpp-test/UnitTest.hpp"
53#include < iostream>
64
@@ -26,13 +24,9 @@ void runTests() {
2624int main () {
2725
2826 oatpp::base::Environment::init ();
29- oatpp::base::Environment::setLogger (new Logger ());
3027
3128 runTests ();
3229
33- oatpp::base::Environment::setLogger (nullptr );
34- oatpp::base::Environment::destroy ();
35-
3630 /* Print how much objects were created during app running, and what have left-probably leaked */
3731 /* Disable object counting for release builds using '-D OATPP_DISABLE_ENV_OBJECT_COUNTERS' flag for better performance */
3832 std::cout << " \n Environment:\n " ;
@@ -41,5 +35,7 @@ int main() {
4135
4236 OATPP_ASSERT (oatpp::base::Environment::getObjectsCount () == 0 );
4337
38+ oatpp::base::Environment::destroy ();
39+
4440 return 0 ;
4541}
You can’t perform that action at this time.
0 commit comments