mirror of
https://github.com/KjellKod/g3log.git
synced 2024-12-12 18:30:25 +01:00
ac37076327
* Cross-comoiling: Version readout fixed Test.cmake: Path handling consistent * ".x" syntax in variable checking removed * Use G3LOG_DEBUG also in linux-specific code * Fixed error when linux and shared library is on * Fixed linux/windows shared lib handling: FATAL_ERROR for wrong cmake version and no message in linux
38 lines
1.1 KiB
C++
38 lines
1.1 KiB
C++
/** ==========================================================================
|
|
* 2014 by KjellKod.cc. This is PUBLIC DOMAIN to use at your own risk and comes
|
|
* with no warranties. This code is yours to share, use and modify with no
|
|
* strings attached and no restrictions or obligations.
|
|
*
|
|
* For more information see g3log/LICENSE or refer refer to http://unlicense.org
|
|
* ============================================================================*/
|
|
|
|
|
|
#include <g3log/g3log.hpp>
|
|
#include <g3log/logworker.hpp>
|
|
#include "tester_sharedlib.h"
|
|
|
|
struct RuntimeLoadedLib : public SomeLibrary {
|
|
|
|
RuntimeLoadedLib() {
|
|
LOG(INFO) << "Library was created";
|
|
LOGF(INFO, "Ready for testing");
|
|
}
|
|
|
|
~RuntimeLoadedLib() {
|
|
LOG(G3LOG_DEBUG) << "Library destroyed";
|
|
}
|
|
|
|
void action() {
|
|
LOG(WARNING) << "Action, action, action. Safe for LOG calls by runtime dynamically loaded libraries";
|
|
}
|
|
};
|
|
|
|
struct RealLibraryFactory : public LibraryFactory {
|
|
SomeLibrary* CreateLibrary() {
|
|
return new RuntimeLoadedLib;
|
|
}
|
|
};
|
|
|
|
RealLibraryFactory testRealFactory;
|
|
|