2
* Copyright © 2012-2013 Canonical Ltd.
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU Lesser General Public License version 3,
6
* as published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTIlocationAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Authored by: Thomas Voß <thomas.voss@canonical.com>
21
#include <com/ubuntu/location/logging.h>
26
namespace location = com::ubuntu::location;
28
int main(int argc, char** argv)
30
// Setup logging for the CLI.
31
FLAGS_logtostderr = true;
32
google::InitGoogleLogging("com.ubuntu.location");
34
location::service::Daemon::Cli::Configuration config;
37
config = location::service::Daemon::Cli::Configuration::from_command_line_args(argc, argv);
38
} catch(const std::runtime_error& e)
40
std::cout << "Problem parsing command line: " << e.what() << std::endl;
41
location::service::Daemon::Cli::print_help(std::cout);
47
location::service::Daemon::Cli::main(config);
48
} catch(const std::exception& e)
50
std::cout << "Problem executing the CLI: " << e.what() << std::endl;