Updated and refactored code

- Added `doxygen` API documentation with theme
- Added error-compatible logging function
- Added more error codes
- Added `non_copyable` function
- Added test function from exporting package list
- Changed how errors are handled with returns
- Change `gdpm remote` API to reflect `git`
- Change most functions to accept a vector of arguments instead of a single parameter
- Updated `.gitignore` and `README.md` files
- Fixed issue with `gdpm export` command crashing
This commit is contained in:
David Allen 2023-05-14 19:30:33 -06:00
parent 8e82a22ebd
commit ba23299777
14 changed files with 2950 additions and 93 deletions

View file

@ -12,10 +12,30 @@
#include <fmt/printf.h>
#include <fmt/format.h>
/*
TODO: Allow setting the logging *prefix*
TODO: Write log information to file
*/
namespace gdpm::log
{
template <typename...Args> concept RequireMinArgs = requires (std::size_t min){ sizeof...(Args) > min; };
enum level{
NONE,
INFO,
WARNING,
DEBUG,
ERROR
};
struct config {
static int level;
static std::string prefix;
static std::string path;
static bool print_to_stdout;
static bool print_to_stderr;
};
static void vlog(fmt::string_view format, fmt::format_args args){
fmt::vprint(format, args);
}