mirror of
https://github.com/KjellKod/g3log.git
synced 2024-12-12 18:30:25 +01:00
7c7012325d
1) Breaking change: g3 namespace replaces g2 2) g2log.hpp remains in src/g2log.hpp... but now all it does is to include the g3log.hpp, etc 3) ALL HEADER FILES ARE IN src/g3log/ while all .cpp and .ipp files are in /src (exception for g2log.hpp) This should make it EASIER for clients to copy/install the header files to the new location. It greatly simplifies rpm and cpackage installationsw
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(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;
|
|
|