LOG::Manager::Locker locker;
locker.mutable_logger("main")->set_formatter(new LOG::StandardLogFormatter());
locker.mutable_logger("main")->set_output(LOG::IODeviceOutput::create_from_file(stdout));
locker.mutable_logger("main")->set_level(LOG::DEBUG);
locker.mutable_logger("main.sub")->set_output(LOG::IODeviceOutput::create_from_file("logoutput.txt"));
locker.mutable_logger("main.sub")->set_level(LOG::DUMP);
LOG::Manager::Locker locker;
locker.mutable_logger("main")->set_formatter(new LOG::StandardLogFormatter());
locker.mutable_logger("main")->set_output(LOG::IODeviceOutput::create_from_file(stdout));
locker.mutable_logger("main")->set_level(LOG::DEBUG);
locker.mutable_logger("main.sub")->set_output(LOG::IODeviceOutput::create_from_file("logoutput.txt"));
locker.mutable_logger("main.sub")->set_level(LOG::DUMP);
To copy to clipboard, switch view to plain text mode
int twenty = 20;
QRect rect
(0,
0,
100,
100);
log_info("main", 1, "log message - parameters without name", P1(key), P1(twenty), P1(rect));
log_debug
("main",
2,
"log message - parameters with name", P2
("name",
5), P2
("key",
"value"), P2
("rect",
QRect(2,
3,
5,
5)));
const quint8 hexdump[] = {0x01, 0x00, 0x0b, 0x00, 0x00, 0x00, ..., 0x01 };
log_debug("main.sub", 3, "here is a hexdump of some data");
log_hexdump("main.sub", 4, hexdump, sizeof(hexdump));
int twenty = 20;
QString key("value");
QRect rect(0, 0, 100, 100);
log_info("main", 1, "log message - parameters without name", P1(key), P1(twenty), P1(rect));
log_debug("main", 2, "log message - parameters with name", P2("name", 5), P2("key", "value"), P2("rect", QRect(2, 3, 5, 5)));
const quint8 hexdump[] = {0x01, 0x00, 0x0b, 0x00, 0x00, 0x00, ..., 0x01 };
log_debug("main.sub", 3, "here is a hexdump of some data");
log_hexdump("main.sub", 4, hexdump, sizeof(hexdump));
To copy to clipboard, switch view to plain text mode
Bookmarks