webserver_cli.cpp (bd1299b74c25fa6123cab497d4b8370689a7a999) | webserver_cli.cpp (7a16ddc8e036eabcbe7e0c8087ceee7a4cb1d2d8) |
---|---|
1#include "boost_formatters.hpp" 2#include "logging.hpp" 3 4#include <CLI/CLI.hpp> 5#include <boost/asio/io_context.hpp> 6#include <sdbusplus/asio/connection.hpp> 7#include <sdbusplus/bus.hpp> 8 --- 26 unchanged lines hidden (view full) --- 35 36 // Set up dbus connection: 37 boost::asio::io_context io; 38 auto conn = std::make_shared<sdbusplus::asio::connection>(io); 39 40 // Attempt to async_call to set logging level 41 conn->async_method_call( 42 [&io](boost::system::error_code& ec) mutable { | 1#include "boost_formatters.hpp" 2#include "logging.hpp" 3 4#include <CLI/CLI.hpp> 5#include <boost/asio/io_context.hpp> 6#include <sdbusplus/asio/connection.hpp> 7#include <sdbusplus/bus.hpp> 8 --- 26 unchanged lines hidden (view full) --- 35 36 // Set up dbus connection: 37 boost::asio::io_context io; 38 auto conn = std::make_shared<sdbusplus::asio::connection>(io); 39 40 // Attempt to async_call to set logging level 41 conn->async_method_call( 42 [&io](boost::system::error_code& ec) mutable { |
43 if (ec) 44 { 45 BMCWEB_LOG_ERROR("SetLogLevel returned error with {}", ec); 46 return; 47 } 48 BMCWEB_LOG_INFO("Successfully changed log-level "); 49 io.stop(); 50 }, | 43 if (ec) 44 { 45 BMCWEB_LOG_ERROR("SetLogLevel returned error with {}", ec); 46 return; 47 } 48 BMCWEB_LOG_INFO("Successfully changed log-level "); 49 io.stop(); 50 }, |
51 service, path, iface, method, loglevel); 52 53 io.run(); 54 55 return 0; 56} | 51 service, path, iface, method, loglevel); 52 53 io.run(); 54 55 return 0; 56} |