From 83ea3724d580ccf4f94319576f2e220858315b7c Mon Sep 17 00:00:00 2001 From: abumusamq Date: Sat, 24 Nov 2018 15:09:56 +1100 Subject: [PATCH] Updated --- ACKNOWLEDGEMENTS.md | 6 ++-- CHANGELOG.md | 4 +++ CMakeLists.txt | 3 +- FindResidue.cmake | 5 +-- LICENSE | 7 ++-- README.md | 61 ++++++++++++++++++----------------- deps/ripe/LICENSE | 6 ++-- deps/ripe/Ripe.cc | 28 +++++++++++++--- deps/ripe/Ripe.h | 32 +++++++++++++++--- dist/npm/headers/package.json | 10 +++--- include/easylogging++.h | 22 ++++++++----- include/residue.h | 6 ++-- src/dispatcher.cc | 8 ++--- src/dispatcher.h | 8 ++--- src/easylogging++.cc | 23 +++++++------ src/internal-logger.cc | 8 ++--- src/internal-logger.h | 8 ++--- src/network-client.cc | 8 ++--- src/network-client.h | 8 ++--- src/residue.cc | 8 ++--- test/main.cc | 8 ++--- test/test.h | 13 ++++---- test/testx.h | 24 +++++++------- 23 files changed, 186 insertions(+), 128 deletions(-) diff --git a/ACKNOWLEDGEMENTS.md b/ACKNOWLEDGEMENTS.md index 5d0337c..248ec3e 100644 --- a/ACKNOWLEDGEMENTS.md +++ b/ACKNOWLEDGEMENTS.md @@ -5,11 +5,11 @@ ``` The MIT License (MIT) -Copyright (c) 2012-2018 Muflihun Labs +Copyright (c) 2012-2018 Zuhd Web Services Copyright (c) 2012-2018 @abumusamq -https://github.com/muflihun/ -https://muflihun.github.io +https://github.com/zuhd-org/ +https://zuhd.org https://muflihun.com Permission is hereby granted, free of charge, to any person obtaining a copy of diff --git a/CHANGELOG.md b/CHANGELOG.md index 14bfc9b..0c8361e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [2.1.4] - 24-11-2018 +- Updated license +- Updated Easylogging++ to 9.96.7 + ## [2.1.3] - 07-09-2018 ### Updated - Updated Easylogging++ to 9.96.5 diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f8c1a2..8ed0b4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ option (special_edition "Special edition build" OFF) set (RESIDUE_MAJOR "2") set (RESIDUE_MINOR "1") -set (RESIDUE_PATCH "3") +set (RESIDUE_PATCH "4") set (RESIDUE_SOVERSION "${RESIDUE_MAJOR}.${RESIDUE_MINOR}.${RESIDUE_PATCH}") set (RESIDUE_NAME "Residue-C++") @@ -190,4 +190,3 @@ if (test) add_test (NAME residueCppUnitTests COMMAND residue-cpp-unit-tests) endif() ## test - diff --git a/FindResidue.cmake b/FindResidue.cmake index b3ae935..5e2e3d4 100644 --- a/FindResidue.cmake +++ b/FindResidue.cmake @@ -7,10 +7,11 @@ # # Specify ${RESIDUE_ROOT} if you wish to specify root path manually, e.g, -DRESIDUE_ROOT=/usr/local # -# (c) 2017-present Muflihun Labs +# (c) 2017-present Zuhd Web Services # (c) 2017-present @abumusamq # -# https://github.com/muflihun/residue-cpp +# https://github.com/zuhd-org/residue-cpp +# https://zuhd.org # https://muflihun.com # diff --git a/LICENSE b/LICENSE index 9174fba..4aa2f58 100644 --- a/LICENSE +++ b/LICENSE @@ -1,9 +1,9 @@ -Copyright 2017-present Muflihun Labs +Copyright 2017-present Zuhd Web Services Copyright 2017-present @abumusamq -https://github.com/muflihun/ +https://github.com/zuhd-org/ https://muflihun.com/ -https://muflihun.github.io/ +https://zuhd.org Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,4 +16,3 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - diff --git a/README.md b/README.md index d3e9e2f..60edbe3 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ ﷽ # Residue C++ Client -Official C++ client library with feature-rich API to interact with residue seamlessly. It uses [Easylogging++](https://github.com/muflihun/easyloggingpp) to interact and take input from the user. Easylogging++ is highly efficient, well-tested library. +Official C++ client library with feature-rich API to interact with residue seamlessly. It uses [Easylogging++](https://github.com/zuhd-org/easyloggingpp) to interact and take input from the user. Easylogging++ is highly efficient, well-tested library. -[![Build Status](https://img.shields.io/travis/muflihun/residue-cpp/master.svg)](https://travis-ci.org/muflihun/residue-cpp) [![Build Status](https://img.shields.io/travis/muflihun/residue-cpp/develop.svg)](https://travis-ci.org/muflihun/residue-cpp) [![Version](https://img.shields.io/github/release/muflihun/residue-cpp.svg)](https://github.com/muflihun/residue-cpp/releases/latest) [![Documentation](https://img.shields.io/badge/docs-doxygen-blue.svg)](https://muflihun.github.io/residue/docs/annotated.html) [![Apache-2.0 license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/muflihun/residue-cpp/blob/master/LICENCE) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/MuflihunDotCom/25) +[![Build Status](https://img.shields.io/travis/zuhd-org/residue-cpp/master.svg)](https://travis-ci.org/zuhd-org/residue-cpp) [![Build Status](https://img.shields.io/travis/zuhd-org/residue-cpp/develop.svg)](https://travis-ci.org/zuhd-org/residue-cpp) [![Version](https://img.shields.io/github/release/zuhd-org/residue-cpp.svg)](https://github.com/zuhd-org/residue-cpp/releases/latest) [![Documentation](https://img.shields.io/badge/docs-doxygen-blue.svg)](https://muflihun.github.io/residue/docs/annotated.html) [![Apache-2.0 license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/zuhd-org/residue-cpp/blob/master/LICENCE) + +[![Donate](https://muflihun.github.io/donate.png?v2)](https://www.paypal.me/zuhd/25) ## Getting Started This library is based on single source file. It automatically includes `` header and expect it to be available on developer's system. Please refer to [documentation page](https://muflihun.github.io/residue/docs/class_residue.html) to check the API. @@ -11,22 +13,22 @@ This library is based on single source file. It automatically includes `=ON`) | ------------ | ------------------------------- | | `test` | Compile unit tests | | `build_sample_app` | Builds detailed-cmake sample | -| `special_edition` | Build [special edition](https://github.com/muflihun/residue/blob/master/docs/INSTALL.md#special-edition) | +| `special_edition` | Build [special edition](https://github.com/zuhd-org/residue/blob/master/docs/INSTALL.md#special-edition) | ### Run Tests Please consider running unit test before you move on @@ -115,10 +117,10 @@ sudo cp -a include/gtest /usr/include sudo cp -a libgtest_main.so libgtest.so /usr/lib/ ## Crypto++ -wget https://raw.githubusercontent.com/muflihun/muflihun.github.io/master/downloads/cryptocpp.tar.gz +wget https://muflihun.github.io/downloads/cryptocpp.tar.gz tar xf cryptocpp.tar.gz cd cryptopp-CRYPTOPP_5_6_5 -wget https://raw.githubusercontent.com/muflihun/muflihun.github.io/master/downloads/pem_pack.zip +wget https://muflihun.github.io/downloads/pem_pack.zip unzip pem_pack.zip cmake . make @@ -139,36 +141,36 @@ sh ../tools/package.sh linux 1.1.0 # specify version carefully to match with wha This will create: * `libresidue-1.1.0-x86_64-linux.tar.gz` * `libresidue-1.1.0-static-x86_64-linux.tar.gz` - + Second one (`libresidue-1.1.0-static-x86_64-linux.tar.gz`) contains static library that is fully independent. ### Strip -You can take advantage [`strip`](https://linux.die.net/man/1/strip) if you wish to link your application statically. This will reduce binary size significantly. +You can take advantage [`strip`](https://linux.die.net/man/1/strip) if you wish to link your application statically. This will reduce binary size significantly. ## Build Matrix | Branch | Platform | Build Status | | -------- |:------------:|:------------:| -| `develop` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `clang++` | [![Build Status](https://travis-matrix-badges.herokuapp.com/repos/muflihun/residue-cpp/branches/develop/1)](https://travis-ci.org/muflihun/residue-cpp) | -| `develop` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `g++-4.9` | [![Build Status](https://travis-matrix-badges.herokuapp.com/repos/muflihun/residue-cpp/branches/develop/2)](https://travis-ci.org/muflihun/residue-cpp) | -| `develop` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `g++-5` | [![Build Status](https://travis-matrix-badges.herokuapp.com/repos/muflihun/residue-cpp/branches/develop/3)](https://travis-ci.org/muflihun/residue-cpp) | -| `develop` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `g++-6` | [![Build Status](https://travis-matrix-badges.herokuapp.com`/repos/muflihun/residue-cpp/`branches/develop/4)](https://travis-ci.org/muflihun/residue-cpp) | -| `develop` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `g++-7` | [![Build Status](https://travis-matrix-badges.herokuapp.com/repos/muflihun/residue-cpp/branches/develop/5)](https://travis-ci.org/muflihun/residue-cpp) | -| `master` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `clang++` | [![Build Status](https://travis-matrix-badges.herokuapp.com/repos/muflihun/residue-cpp/branches/master/1)](https://travis-ci.org/muflihun/residue-cpp) | -| `master` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `g++-4.9` | [![Build Status](https://travis-matrix-badges.herokuapp.com/repos/muflihun/residue-cpp/branches/master/2)](https://travis-ci.org/muflihun/residue-cpp) | -| `master` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `g++-5` | [![Build Status](https://travis-matrix-badges.herokuapp.com/repos/muflihun/residue-cpp/branches/master/3)](https://travis-ci.org/muflihun/residue-cpp) | -| `master` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `g++-6` | [![Build Status](https://travis-matrix-badges.herokuapp.com/repos/muflihun/residue-cpp/branches/master/4)](https://travis-ci.org/muflihun/residue-cpp) | -| `master` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `g++-7` | [![Build Status](https://travis-matrix-badges.herokuapp.com/repos/muflihun/residue-cpp/branches/master/5)](https://travis-ci.org/muflihun/residue-cpp) | +| `develop` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `clang++` | [![Build Status](https://travis-matrix-badges.herokuapp.com/repos/zuhd-org/residue-cpp/branches/develop/1)](https://travis-ci.org/zuhd-org/residue-cpp) | +| `develop` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `g++-4.9` | [![Build Status](https://travis-matrix-badges.herokuapp.com/repos/zuhd-org/residue-cpp/branches/develop/2)](https://travis-ci.org/zuhd-org/residue-cpp) | +| `develop` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `g++-5` | [![Build Status](https://travis-matrix-badges.herokuapp.com/repos/zuhd-org/residue-cpp/branches/develop/3)](https://travis-ci.org/zuhd-org/residue-cpp) | +| `develop` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `g++-6` | [![Build Status](https://travis-matrix-badges.herokuapp.com`/repos/zuhd-org/residue-cpp/`branches/develop/4)](https://travis-ci.org/zuhd-org/residue-cpp) | +| `develop` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `g++-7` | [![Build Status](https://travis-matrix-badges.herokuapp.com/repos/zuhd-org/residue-cpp/branches/develop/5)](https://travis-ci.org/zuhd-org/residue-cpp) | +| `master` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `clang++` | [![Build Status](https://travis-matrix-badges.herokuapp.com/repos/zuhd-org/residue-cpp/branches/master/1)](https://travis-ci.org/zuhd-org/residue-cpp) | +| `master` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `g++-4.9` | [![Build Status](https://travis-matrix-badges.herokuapp.com/repos/zuhd-org/residue-cpp/branches/master/2)](https://travis-ci.org/zuhd-org/residue-cpp) | +| `master` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `g++-5` | [![Build Status](https://travis-matrix-badges.herokuapp.com/repos/zuhd-org/residue-cpp/branches/master/3)](https://travis-ci.org/zuhd-org/residue-cpp) | +| `master` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `g++-6` | [![Build Status](https://travis-matrix-badges.herokuapp.com/repos/zuhd-org/residue-cpp/branches/master/4)](https://travis-ci.org/zuhd-org/residue-cpp) | +| `master` | GNU/Linux 4.4 / Ubuntu 4.8.4 64-bit / `g++-7` | [![Build Status](https://travis-matrix-badges.herokuapp.com/repos/zuhd-org/residue-cpp/branches/master/5)](https://travis-ci.org/zuhd-org/residue-cpp) | ## License ``` -Copyright 2017-present Muflihun Labs +Copyright 2017-present Zuhd Web Services Copyright 2017-present @abumusamq -https://github.com/muflihun/ -https://muflihun.github.io/ +https://github.com/zuhd-org/ https://muflihun.com/ +https://zuhd.org Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -181,4 +183,5 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + ``` diff --git a/deps/ripe/LICENSE b/deps/ripe/LICENSE index a05b5d1..7b457bf 100644 --- a/deps/ripe/LICENSE +++ b/deps/ripe/LICENSE @@ -1,7 +1,8 @@ -Copyright 2017 Muflihun Labs +Copyright 2017-present Zuhd Web Services -https://github.com/muflihun/ +https://github.com/zuhd-org/ https://muflihun.com +https://zuhd.org Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,4 +15,3 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - diff --git a/deps/ripe/Ripe.cc b/deps/ripe/Ripe.cc index 0ffd0bf..c1e288f 100644 --- a/deps/ripe/Ripe.cc +++ b/deps/ripe/Ripe.cc @@ -1,11 +1,11 @@ // // Ripe // -// Copyright 2017-present Muflihun Labs +// Copyright 2017-present Zuhd Web Services // -// https://muflihun.com/ -// https://muflihun.github.io/ripe/ -// https://github.com/muflihun/ripe +// https://muflihun.com +// https://zuhd.org +// https://github.com/zuhd-org/ripe // // Author: @abumusamq // @@ -38,10 +38,12 @@ #include #include #include +#include +#include #include -#include "Ripe.h" +#include "../include/Ripe.h" #define RIPE_UNUSED(x) (void)x @@ -507,6 +509,22 @@ std::string Ripe::decompressString(const std::string& str) return outstring; } +std::string Ripe::sha256Hash(const std::string& data) +{ + std::string digest; + SHA256 hasher; + StringSource ss(data, true, new HashFilter(hasher, new HexEncoder(new StringSink(digest)))); + return digest; +} + +std::string Ripe::sha512Hash(const std::string& data) +{ + std::string digest; + CryptoPP::SHA512 hasher; + StringSource ss(data, true, new HashFilter(hasher, new HexEncoder(new StringSink(digest)))); + return digest; +} + std::string Ripe::prepareData(const std::string& data, const std::string& hexKey, const char* clientId, const std::string& ivec) { std::vector iv; diff --git a/deps/ripe/Ripe.h b/deps/ripe/Ripe.h index a157b32..21e55d3 100644 --- a/deps/ripe/Ripe.h +++ b/deps/ripe/Ripe.h @@ -1,11 +1,11 @@ // // Ripe // -// Copyright 2017-present Muflihun Labs +// Copyright 2017-present Zuhd Web Services // -// https://muflihun.com/ -// https://muflihun.github.io/ripe/ -// https://github.com/muflihun/ripe +// https://muflihun.com +// https://zuhd.org +// https://github.com/zuhd-org/ripe // // Author: @abumusamq // @@ -390,6 +390,30 @@ RIPE_API class Ripe { */ static std::string decompressString(const std::string& str); + /*****************************************************************************************************/ + + /*******************************************************************\ + * MISC * + ******************************************************************* + ******************************************************************* + * * + * SHA * + * * + ******************************************************************* + ******************************************************************* + \*******************************************************************/ + + /** + * @brief Generate SHA-256 hash of given string + */ + static std::string sha256Hash(const std::string&); + + + /** + * @brief Generate SHA-512 hash of given string + */ + static std::string sha512Hash(const std::string&); + /*****************************************************************************************************/ diff --git a/dist/npm/headers/package.json b/dist/npm/headers/package.json index d94eac0..94a647d 100644 --- a/dist/npm/headers/package.json +++ b/dist/npm/headers/package.json @@ -1,14 +1,14 @@ { "name": "libresidue", - "version": "2.1.3", - "description": "Residue C++ client library (headers only). For binaries please go to https://github.com/muflihun/residue-cpp/releases", + "version": "2.1.4", + "description": "Residue C++ client library (headers only). For binaries please go to https://github.com/zuhd-org/residue-cpp/releases", "main": "include_dirs.js", - "homepage": "https://github.com/muflihun/residue-cpp", - "author": "Muflihun Labs ", + "homepage": "https://github.com/zuhd-org/residue-cpp", + "author": "Zuhd Web Services ", "license": "Apache-2.0", "repository": { "type": "git", - "url": "http://github.com/muflihun/residue-cpp.git" + "url": "http://github.com/zuhd-org/residue-cpp.git" }, "keywords": [ "residue", diff --git a/include/easylogging++.h b/include/easylogging++.h index 6e63afe..688d537 100644 --- a/include/easylogging++.h +++ b/include/easylogging++.h @@ -1,17 +1,16 @@ // // Bismillah ar-Rahmaan ar-Raheem // -// Easylogging++ v9.96.5 +// Easylogging++ v9.96.7 // Single-header only, cross-platform logging library for C++ applications // -// Copyright (c) 2012-2018 Muflihun Labs +// Copyright (c) 2012-2018 Zuhd Web Services // Copyright (c) 2012-2018 @abumusamq // // This library is released under the MIT Licence. -// https://github.com/muflihun/easyloggingpp/blob/master/LICENSE +// https://github.com/zuhd-org/easyloggingpp/blob/master/LICENSE // -// https://github.com/muflihun/easyloggingpp -// https://muflihun.github.io/easyloggingpp +// https://zuhd.org // http://muflihun.com // @@ -115,8 +114,13 @@ #else # define ELPP_OS_NETBSD 0 #endif +#if defined(__EMSCRIPTEN__) +# define ELPP_OS_EMSCRIPTEN 1 +#else +# define ELPP_OS_EMSCRIPTEN 0 +#endif // Unix -#if ((ELPP_OS_LINUX || ELPP_OS_MAC || ELPP_OS_FREEBSD || ELPP_OS_NETBSD || ELPP_OS_SOLARIS || ELPP_OS_AIX) && (!ELPP_OS_WINDOWS)) +#if ((ELPP_OS_LINUX || ELPP_OS_MAC || ELPP_OS_FREEBSD || ELPP_OS_NETBSD || ELPP_OS_SOLARIS || ELPP_OS_AIX || ELPP_OS_EMSCRIPTEN) && (!ELPP_OS_WINDOWS)) # define ELPP_OS_UNIX 1 #else # define ELPP_OS_UNIX 0 @@ -201,7 +205,7 @@ ELPP_INTERNAL_DEBUGGING_OUT_INFO << ELPP_INTERNAL_DEBUGGING_MSG(internalInfoStre # define ELPP_INTERNAL_INFO(lvl, msg) #endif // (defined(ELPP_DEBUG_INFO)) #if (defined(ELPP_FEATURE_ALL)) || (defined(ELPP_FEATURE_CRASH_LOG)) -# if (ELPP_COMPILER_GCC && !ELPP_MINGW && !ELPP_OS_ANDROID) +# if (ELPP_COMPILER_GCC && !ELPP_MINGW && !ELPP_OS_ANDROID && !ELPP_OS_EMSCRIPTEN) # define ELPP_STACKTRACE 1 # else # if ELPP_COMPILER_MSVC @@ -736,10 +740,12 @@ static const char* kDefaultLoggerId = ELPP_DEFAULT_L static const char* kDefaultLoggerId = "default"; #endif +#if defined(ELPP_FEATURE_ALL) || defined(ELPP_FEATURE_PERFORMANCE_TRACKING) #ifdef ELPP_DEFAULT_PERFORMANCE_LOGGER static const char* kPerformanceLoggerId = ELPP_DEFAULT_PERFORMANCE_LOGGER; #else static const char* kPerformanceLoggerId = "performance"; +#endif // ELPP_DEFAULT_PERFORMANCE_LOGGER #endif #if defined(ELPP_SYSLOG) @@ -3766,7 +3772,7 @@ class Helpers : base::StaticClass { return ELPP->hasCustomFormatSpecifier(formatSpecifier); } static inline void validateFileRolling(Logger* logger, Level level) { - if (logger == nullptr) return; + if (ELPP == nullptr || logger == nullptr) return; logger->m_typedConfigurations->validateFileRolling(level, ELPP->preRollOutCallback()); } }; diff --git a/include/residue.h b/include/residue.h index ba8f6ff..85d1952 100644 --- a/include/residue.h +++ b/include/residue.h @@ -3,12 +3,12 @@ // // Official C++ client library for Residue logging server // -// Copyright (C) 2017-present Muflihun Labs +// Copyright (C) 2017-present Zuhd Web Services // Copyright (C) 2017-present @abumusamq // // https://muflihun.com/ -// https://muflihun.github.io/residue/ -// https://github.com/muflihun/residue-cpp/ +// https://zuhd.org +// https://github.com/zuhd-org/residue-cpp/ // // See https://github.com/muflihun/residue-cpp/blob/master/LICENSE // for licensing information diff --git a/src/dispatcher.cc b/src/dispatcher.cc index e9d0731..059c5d7 100644 --- a/src/dispatcher.cc +++ b/src/dispatcher.cc @@ -4,14 +4,14 @@ // // Official C++ client library for Residue logging server // -// Copyright (C) 2017-present Muflihun Labs +// Copyright (C) 2017-present Zuhd Web Services // Copyright (C) 2017-present @abumusamq // // https://muflihun.com/ -// https://muflihun.github.io/residue/ -// https://github.com/muflihun/residue-cpp/ +// https://zuhd.org +// https://github.com/zuhd-org/residue-cpp/ // -// See https://github.com/muflihun/residue-cpp/blob/master/LICENSE +// See https://github.com/zuhd-org/residue-cpp/blob/master/LICENSE // for licensing information // diff --git a/src/dispatcher.h b/src/dispatcher.h index 4a3c232..8609003 100644 --- a/src/dispatcher.h +++ b/src/dispatcher.h @@ -4,14 +4,14 @@ // // Official C++ client library for Residue logging server // -// Copyright (C) 2017-present Muflihun Labs +// Copyright (C) 2017-present Zuhd Web Services // Copyright (C) 2017-present @abumusamq // // https://muflihun.com/ -// https://muflihun.github.io/residue/ -// https://github.com/muflihun/residue-cpp/ +// https://zuhd.org +// https://github.com/zuhd-org/residue-cpp/ // -// See https://github.com/muflihun/residue-cpp/blob/master/LICENSE +// See https://github.com/zuhd-org/residue-cpp/blob/master/LICENSE // for licensing information // diff --git a/src/easylogging++.cc b/src/easylogging++.cc index d79174f..d763ee7 100644 --- a/src/easylogging++.cc +++ b/src/easylogging++.cc @@ -1,17 +1,16 @@ // // Bismillah ar-Rahmaan ar-Raheem // -// Easylogging++ v9.96.5 +// Easylogging++ v9.96.7 // Cross-platform logging library for C++ applications // -// Copyright (c) 2012-2018 Muflihun Labs +// Copyright (c) 2012-2018 Zuhd Web Services // Copyright (c) 2012-2018 @abumusamq // // This library is released under the MIT Licence. -// https://github.com/muflihun/easyloggingpp/blob/master/LICENSE +// https://github.com/zuhd-org/easyloggingpp/blob/master/LICENSE // -// https://github.com/muflihun/easyloggingpp -// https://muflihun.github.io/easyloggingpp +// https://zuhd.org // http://muflihun.com // @@ -931,7 +930,7 @@ void Str::replaceFirstWithEscape(base::type::string_t& str, const base::type::st std::size_t foundAt = base::type::string_t::npos; while ((foundAt = str.find(replaceWhat, foundAt + 1)) != base::type::string_t::npos) { if (foundAt > 0 && str[foundAt - 1] == base::consts::kFormatSpecifierChar) { - str.erase(foundAt > 0 ? foundAt - 1 : 0, 1); + str.erase(foundAt - 1, 1); ++foundAt; } else { str.replace(foundAt, replaceWhat.length(), replaceWith); @@ -1500,7 +1499,7 @@ void LogFormat::parseFromFormat(const base::type::string_t& userFormat) { if (hasFlag(flag)) { // If we already have flag we remove the escape chars so that '%%' is turned to '%' // even after specifier resolution - this is because we only replaceFirst specifier - formatCopy.erase(foundAt > 0 ? foundAt - 1 : 0, 1); + formatCopy.erase(foundAt - 1, 1); ++foundAt; } } else { @@ -2068,20 +2067,26 @@ Storage::Storage(const LogBuilderPtr& defaultLogBuilder) : m_registeredLoggers(new base::RegisteredLoggers(defaultLogBuilder)), m_flags(ELPP_DEFAULT_LOGGING_FLAGS), m_vRegistry(new base::VRegistry(0, &m_flags)), + #if ELPP_ASYNC_LOGGING m_asyncLogQueue(new base::AsyncLogQueue()), m_asyncDispatchWorker(asyncDispatchWorker), #endif // ELPP_ASYNC_LOGGING + m_preRollOutCallback(base::defaultPreRollOutCallback) { // Register default logger m_registeredLoggers->get(std::string(base::consts::kDefaultLoggerId)); // We register default logger anyway (worse case it's not going to register) just in case m_registeredLoggers->get("default"); + +#if defined(ELPP_FEATURE_ALL) || defined(ELPP_FEATURE_PERFORMANCE_TRACKING) // Register performance logger and reconfigure format Logger* performanceLogger = m_registeredLoggers->get(std::string(base::consts::kPerformanceLoggerId)); m_registeredLoggers->get("performance"); performanceLogger->configurations()->setGlobally(ConfigurationType::Format, std::string("%datetime %level %msg")); performanceLogger->reconfigure(); +#endif // defined(ELPP_FEATURE_ALL) || defined(ELPP_FEATURE_PERFORMANCE_TRACKING) + #if defined(ELPP_SYSLOG) // Register syslog logger and reconfigure format Logger* sysLogLogger = m_registeredLoggers->get(std::string(base::consts::kSysLogLoggerId)); @@ -3097,11 +3102,11 @@ void Loggers::clearVModules(void) { // VersionInfo const std::string VersionInfo::version(void) { - return std::string("9.96.5"); + return std::string("9.96.7"); } /// @brief Release date of current version const std::string VersionInfo::releaseDate(void) { - return std::string("07-09-2018 0950hrs"); + return std::string("24-11-2018 0728hrs"); } } // namespace el diff --git a/src/internal-logger.cc b/src/internal-logger.cc index 7b9e66a..9fa4574 100644 --- a/src/internal-logger.cc +++ b/src/internal-logger.cc @@ -4,14 +4,14 @@ // // Official C++ client library for Residue logging server // -// Copyright (C) 2017-present Muflihun Labs +// Copyright (C) 2017-present Zuhd Web Services // Copyright (C) 2017-present @abumusamq // // https://muflihun.com/ -// https://muflihun.github.io/residue/ -// https://github.com/muflihun/residue-cpp/ +// https://zuhd.org +// https://github.com/zuhd-org/residue-cpp/ // -// See https://github.com/muflihun/residue-cpp/blob/master/LICENSE +// See https://github.com/zuhd-org/residue-cpp/blob/master/LICENSE // for licensing information // diff --git a/src/internal-logger.h b/src/internal-logger.h index 7a2c55d..63a5f4e 100644 --- a/src/internal-logger.h +++ b/src/internal-logger.h @@ -4,14 +4,14 @@ // // Official C++ client library for Residue logging server // -// Copyright (C) 2017-present Muflihun Labs +// Copyright (C) 2017-present Zuhd Web Services // Copyright (C) 2017-present @abumusamq // // https://muflihun.com/ -// https://muflihun.github.io/residue/ -// https://github.com/muflihun/residue-cpp/ +// https://zuhd.org +// https://github.com/zuhd-org/residue-cpp/ // -// See https://github.com/muflihun/residue-cpp/blob/master/LICENSE +// See https://github.com/zuhd-org/residue-cpp/blob/master/LICENSE // for licensing information // diff --git a/src/network-client.cc b/src/network-client.cc index 936caba..54cafa9 100644 --- a/src/network-client.cc +++ b/src/network-client.cc @@ -4,14 +4,14 @@ // // Official C++ client library for Residue logging server // -// Copyright (C) 2017-present Muflihun Labs +// Copyright (C) 2017-present Zuhd Web Services // Copyright (C) 2017-present @abumusamq // // https://muflihun.com/ -// https://muflihun.github.io/residue/ -// https://github.com/muflihun/residue-cpp/ +// https://zuhd.org +// https://github.com/zuhd-org/residue-cpp/ // -// See https://github.com/muflihun/residue-cpp/blob/master/LICENSE +// See https://github.com/zuhd-org/residue-cpp/blob/master/LICENSE // for licensing information // diff --git a/src/network-client.h b/src/network-client.h index 07f94f1..35ea208 100644 --- a/src/network-client.h +++ b/src/network-client.h @@ -4,14 +4,14 @@ // // Official C++ client library for Residue logging server // -// Copyright (C) 2017-present Muflihun Labs +// Copyright (C) 2017-present Zuhd Web Services // Copyright (C) 2017-present @abumusamq // // https://muflihun.com/ -// https://muflihun.github.io/residue/ -// https://github.com/muflihun/residue-cpp/ +// https://zuhd.org +// https://github.com/zuhd-org/residue-cpp/ // -// See https://github.com/muflihun/residue-cpp/blob/master/LICENSE +// See https://github.com/zuhd-org/residue-cpp/blob/master/LICENSE // for licensing information // diff --git a/src/residue.cc b/src/residue.cc index 22bd65d..7863a84 100644 --- a/src/residue.cc +++ b/src/residue.cc @@ -4,14 +4,14 @@ // // Official C++ client library for Residue logging server // -// Copyright (C) 2017-present Muflihun Labs +// Copyright (C) 2017-present Zuhd Web Services // Copyright (C) 2017-present @abumusamq // // https://muflihun.com/ -// https://muflihun.github.io/residue/ -// https://github.com/muflihun/residue-cpp/ +// https://zuhd.org +// https://github.com/zuhd-org/residue-cpp/ // -// See https://github.com/muflihun/residue-cpp/blob/master/LICENSE +// See https://github.com/zuhd-org/residue-cpp/blob/master/LICENSE // for licensing information // diff --git a/test/main.cc b/test/main.cc index f3ee152..711afd1 100644 --- a/test/main.cc +++ b/test/main.cc @@ -3,14 +3,14 @@ // // Official C++ client library for Residue logging server // -// Copyright (C) 2017-present Muflihun Labs +// Copyright (C) 2017-present Zuhd Web Services // Copyright (C) 2017-present @abumusamq // // https://muflihun.com/ -// https://muflihun.github.io/residue/ -// https://github.com/muflihun/residue-cpp/ +// https://zuhd.org +// https://github.com/zuhd-org/residue-cpp/ // -// See https://github.com/muflihun/residue-cpp/blob/master/LICENSE +// See https://github.com/zuhd-org/residue-cpp/blob/master/LICENSE // for licensing information // diff --git a/test/test.h b/test/test.h index 3564cc2..0c9e2b8 100644 --- a/test/test.h +++ b/test/test.h @@ -3,15 +3,14 @@ // // Official C++ client library for Residue logging server // -// Copyright (C) 2017-present Muflihun Labs +// Copyright (C) 2017-present Zuhd Web Services +// Copyright (C) 2017-present @abumusamq // -// Author: @abumusamq +// https://muflihun.com/ +// https://zuhd.org +// https://github.com/zuhd-org/residue-cpp/ // -// https://muflihun.com -// https://muflihun.github.io/residue -// https://github.com/muflihun/residue-cpp -// -// See https://github.com/muflihun/residue-cpp/blob/master/LICENSE +// See https://github.com/zuhd-org/residue-cpp/blob/master/LICENSE // for licensing information // diff --git a/test/testx.h b/test/testx.h index 7762205..1635aac 100644 --- a/test/testx.h +++ b/test/testx.h @@ -4,12 +4,12 @@ // TestX 1.0.4 // Single C++11 header for creating typesafe test data // -// Copyright (c) 2017-present Muflihun Labs +// Copyright (c) 2017-present Zuhd Web Services // // This library is released under the MIT Licence. // -// https://github.com/muflihun/testx/ -// https://muflihun.github.io/ +// https://github.com/zuhd-org/testx/ +// https://zuhd.org // https://muflihun.com/ // #ifndef MUFLIHUN_TEST_X_H @@ -21,9 +21,9 @@ namespace muflihun { namespace testx { - + /** - * @brief Test case with variadic templates. + * @brief Test case with variadic templates. * * The test case item can be accessed using get function */ @@ -35,40 +35,40 @@ namespace muflihun { using TestCaseItemType = typename std::remove_reference< decltype(std::get(std::tuple())) >::type; - + TestCase(Args... args) : m_data(args...) { } - + template auto get() const -> TestCaseItemType { return std::get(m_data); } - + const std::tuple& data() const { return m_data; } private: std::tuple m_data; }; - + /** * @brief A test data wrapper */ template using TestDataW = std::vector; - + /** * @brief A simple test case container that can be iterated using for (auto& testcase : data) ... */ template using TestData = TestDataW>; - + /** * @brief A TestCase wrapper to create test case with implicit type */ template TestCase TestCaseW(T... t) { return TestCase(t...); } - + } // namespace testx } // namespace muflihun