Google::glog throws unspecified iostream_category exception when trying to log

754 Views Asked by At

So this is my code I am trying to run:

int main(int argc, char* argv[])
{
    try
    {
        google::InitGoogleLogging(argv[0]);

        boost::asio::io_service io_service;
        LOG(INFO) << "Program started";
        Server s(io_service, 7899);

        io_service.run();
    }
    catch (std::exception& e)
    {
        std::cerr << "Exception: " << e.what() << "\n";
    }

    return 0;
}

It compiles ok, but when I am trying to run it I get this exception thrown:

Exception: ios_base::clear: unspecified iostream_category error

If I remove the LOG(INFO) line I can run the program. Anyone knows why I get the exception ?

0

There are 0 best solutions below