Skip to content

Commit 96d00ec

Browse files
committed
Updated to latest oatpp APIs
1 parent 20e8696 commit 96d00ec

File tree

4 files changed

+3
-46
lines changed

4 files changed

+3
-46
lines changed

main/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ set(CMAKE_CXX_STANDARD 11)
99
add_library(${project_name}-lib
1010
src/App.cpp
1111
src/AppComponent.hpp
12-
src/Logger.hpp
1312
src/ServiceComponent.hpp
1413
src/SwaggerComponent.hpp
1514
src/controller/UserController.cpp

main/src/App.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include "./AppComponent.hpp"
1111
#include "./ServiceComponent.hpp"
1212
#include "./SwaggerComponent.hpp"
13-
#include "./Logger.hpp"
1413

1514
#include "oatpp/network/server/Server.hpp"
1615

@@ -59,14 +58,11 @@ void run(const oatpp::base::CommandLineArguments& args) {
5958
* main
6059
*/
6160
int main(int argc, const char * argv[]) {
62-
63-
oatpp::base::Environment::setLogger(new Logger());
61+
6462
oatpp::base::Environment::init();
6563

6664
run(oatpp::base::CommandLineArguments(argc, argv));
6765

68-
oatpp::base::Environment::setLogger(nullptr); ///< free Logger
69-
7066
/* Print how much objects were created during app running, and what have left-probably leaked */
7167
/* Disable object counting for release builds using '-D OATPP_DISABLE_ENV_OBJECT_COUNTERS' flag for better performance */
7268
std::cout << "\nEnvironment:\n";

main/src/Logger.hpp

Lines changed: 0 additions & 34 deletions
This file was deleted.

main/test/tests.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11

2-
#include "Logger.hpp"
3-
42
#include "oatpp-test/UnitTest.hpp"
53
#include <iostream>
64

@@ -26,13 +24,9 @@ void runTests() {
2624
int 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 << "\nEnvironment:\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
}

0 commit comments

Comments
 (0)