build(wasm): liblogging now builds for wasm
Further, due to limitations of file system access on wasm, liblogging now outputs all logs to the console syncronously
This commit is contained in:
1
examples/meson.build
Normal file
1
examples/meson.build
Normal file
@@ -0,0 +1 @@
|
||||
executable('simple_logging_test', 'simple.cpp', dependencies: [logging_dep])
|
||||
16
examples/simple.cpp
Normal file
16
examples/simple.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
#include "quill/LogMacros.h"
|
||||
|
||||
#include "fourdst/logging/logging.h"
|
||||
|
||||
|
||||
int main() {
|
||||
auto& logManager = fourdst::logging::LogManager::getInstance();
|
||||
quill::Logger* logger = logManager.newFileLogger("test.log", "logger");
|
||||
|
||||
std::cout << "Logging...\n";
|
||||
LOG_INFO(logger, "This is an info message: {}", 42);
|
||||
std::cout << "Done Logging\n";
|
||||
}
|
||||
Reference in New Issue
Block a user