Keep logging devices to avoid a segfault with C++ static variables