Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
abumq authored Dec 25, 2020
2 parents 24b0de3 + 1490004 commit fa10a79
Show file tree
Hide file tree
Showing 20 changed files with 155 additions and 108 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Change Log

## [9.96.7] - 24-11-2018
- Adds support for compiling easyloggingpp using Emscripten. This allows the library to be compiled into Javascript or WebAssembly and run in the browser while logging to the browser's Javascript console.
- Adds support for compiling easyloggingpp using Emscripten. This allows the library to be compiled into JavaScript or WebAssembly and run in the browser while logging to the browser's JavaScript console.

## [9.96.6] - 24-11-2018
- Storage constructor (indirectly) attempts to access elStorage before it's initialized (issue #660) (@Barteks2x)
Expand Down
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/easyloggingpp.pc.cmakein

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/easyloggingpp.pc DESTINATION "${ELPP_PKGCONFIG_INSTALL_DIR}")

include(CheckIncludeFileCXX)
check_include_file_cxx("execinfo.h" HAVE_EXECINFO)
if (HAVE_EXECINFO)
add_definitions(-DHAVE_EXECINFO)
endif()

if (build_static_lib)
if (lib_utc_datetime)
add_definitions(-DELPP_UTC_DATETIME)
Expand Down
22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

[![Donate](https://amrayn.github.io/donate.png?v2)](https://amrayn.com/donate)

#### Looking for maintainers!!

### Quick Links

Expand Down Expand Up @@ -174,7 +175,7 @@ Now compile using
g++ main.cc easylogging++.cc -o prog -std=c++11
```
That simple! Please note that `INITIALIZE_EASYLOGGINGPP` should be used once and once-only otherwise you will end up getting compilation errors. This is definiting several `extern` variables. This means it can be defined only once per application. Best place to put this initialization statement is in file where `int main(int, char**)` function is defined, right after last include statement.
That simple! Please note that `INITIALIZE_EASYLOGGINGPP` should be used once and once-only otherwise you will end up getting compilation errors. This is the definition of several `extern` variables. This means it can be defined only once per application. Best place to put this initialization statement is in file where `int main(int, char**)` function is defined, right after last include statement.
### Install (Optional)
If you want to install this header system-wide, you can do so via:
Expand All @@ -194,6 +195,17 @@ Following options are supported by Easylogging++ cmake and you can turn these op
With that said, you will still need `easylogging++.cc` file in order to compile. For header only, please check [v9.89](https://github.com/amrayn/easyloggingpp/releases/tag/9.89) and lower.
Alternatively, you can download and install easyloggingpp using the [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager:
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install easyloggingpp
The easyloggingpp port in vcpkg is kept up to date by Microsoft team members and community contributors.
If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
[![top] Goto Top](#table-of-contents)
### Setting Application Arguments
Expand Down Expand Up @@ -446,7 +458,7 @@ Form some parts of logging you can set logging flags; here are flags supported:
| `AllowVerboseIfModuleNotSpecified (2)` | Makes sure if -vmodule is used and does not specifies a module, then verbose logging is allowed via that module. Say param was -vmodule=main*=3 and a verbose log is being written from a file called something.cpp then if this flag is enabled, log will be written otherwise it will be disallowed. Note: having this defeats purpose of -vmodule |
| `LogDetailedCrashReason (4)` | When handling crashes by default, detailed crash reason will be logged as well (Disabled by default) ([issue #90](https://github.com/amrayn/easyloggingpp/issues/90)) |
| `DisableApplicationAbortOnFatalLog (8)` | Allows to disable application abortion when logged using FATAL level. Note that this does not apply to default crash handlers as application should be aborted after crash signal is handled. (Not added by default) ([issue #119](https://github.com/amrayn/easyloggingpp/issues/119)) |
| `ImmediateFlush (16)` | Flushes log with every log-entry (performance sensative) - Disabled by default |
| `ImmediateFlush (16)` | Flushes log with every log-entry (performance sensitive) - Disabled by default |
| `StrictLogFileSizeCheck (32)` | Makes sure log file size is checked with every log |
| `ColoredTerminalOutput (64)` | Terminal output will be colorful if supported by terminal. |
| `MultiLoggerSupport (128)` | Enables support for using multiple loggers to log single message. (E.g, `CLOG(INFO, "default", "network") << This will be logged using default and network loggers;`) |
Expand All @@ -456,7 +468,7 @@ Form some parts of logging you can set logging flags; here are flags supported:
| `HierarchicalLogging (2048)` | Enables hierarchical logging. This is not applicable to verbose logging.|
| `CreateLoggerAutomatically (4096)` | Creates logger automatically when not available. |
| `AutoSpacing (8192)` | Automatically adds spaces. E.g, `LOG(INFO) << "DODGE" << "THIS!";` will output "DODGE THIS!"|
| `FixedTimeFormat (16384)` | Applicable to performace tracking only - this prevents formatting time. E.g, `1001 ms` will be logged as is, instead of formatting it as `1.01 sec`|
| `FixedTimeFormat (16384)` | Applicable to performance tracking only - this prevents formatting time. E.g, `1001 ms` will be logged as is, instead of formatting it as `1.01 sec`|
| `IgnoreSigInt (32768)` | When application crashes ignore Interruption signal |

You can set/unset these flags by using static `el::Loggers::addFlag` and `el::Loggers::removeFlag`. You can check to see if certain flag is available by using `el::Loggers::hasFlag`, all these functions take strongly-typed enum `el::LoggingFlag`
Expand Down Expand Up @@ -1370,7 +1382,7 @@ Asynchronous logging is in experimental stages and they are not widely promoted.
Please note:
* Asynchronous will only work with few compilers (it purely uses `std::thread`)
* Compiler should support `std::this_thread::sleep_for`. This restriction may (or may not) be removed in future (stable) version of asynchronous logging.
* You should not rely on asynchronous logging in production, this is because feature is in experiemental stages.
* You should not rely on asynchronous logging in production, this is because feature is in experimental stages.

[![top] Goto Top](#table-of-contents)

Expand Down Expand Up @@ -1403,7 +1415,7 @@ Try to provide as much information as possible. Any bug with no clear informatio

# Compatibility

Easylogging++ requires a decent C++0x complient compiler. Some compilers known to work with v9.0+ are shown in table below, for older versions please refer to readme on corresponding release at github
Easylogging++ requires a decent C++0x compliant compiler. Some compilers known to work with v9.0+ are shown in table below, for older versions please refer to readme on corresponding release at github

| ***** | Compiler/Platform | Notes |
|---------|---------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
Expand Down
2 changes: 1 addition & 1 deletion doc/RELEASE-NOTES-v9.09
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Easylogging++ v9.09 RELEASE NOTES
= REFACTORING =
==========================

- Seperated writer from dispatcher + log class
- Separated writer from dispatcher + log class

==========================
= NOTES =
Expand Down
2 changes: 1 addition & 1 deletion doc/RELEASE-NOTES-v9.17
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Easylogging++ v9.17 RELEASE NOTES
= IMPROVEMENTS =
=============================

- Assertion failure and does not process when configuratoin file does not exist
- Assertion failure and does not process when configuration file does not exist

==========================
= NOTES =
Expand Down
4 changes: 2 additions & 2 deletions doc/RELEASE-NOTES-v9.18
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ Easylogging++ v9.18 RELEASE NOTES
= FIXES =
==========================

- Completely dithced away QA logging even macros unusable
- Completely ditched away QA logging even macros unusable
- Fixed some of verbose logging macro expansions

==========================
= NEW FEATURES =
==========================

- Only allow aplha-numeric (+ some symbols) for logger names (issue #105)
- Only allow alpha-numeric (+ some symbols) for logger names (issue #105)
- Case insensitive app args (issue #106)
- Helper to reconfigure specific level for all loggers (issue #107)
- DCHECK macros for debug mode checks (issue #108)
Expand Down
2 changes: 1 addition & 1 deletion doc/RELEASE-NOTES-v9.21
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Easylogging++ v9.21 RELEASE NOTES
- Configuring same logger twice loses some information (issue #116)

==========================
= NEW FEATRUES =
= NEW FEATURES =
==========================

- Added base configurations pointer to `parseFromText` same as `parseFromFile`
Expand Down
2 changes: 1 addition & 1 deletion doc/RELEASE-NOTES-v9.25
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Easylogging++ v9.25 RELEASE NOTES
==========================

- Default log file using command line args (issue #122)
- Introduced `LoggingFlag::ImmediateFlush` for performance imporvement (issue #127)
- Introduced `LoggingFlag::ImmediateFlush` for performance improvement (issue #127)
- Introduced `ConfigurationType::LogFlushThreshold` to manually specify log flush threshold (issue #126)
- Introduced `Logger::flush` family and `Loggers::flushAll` family of function to manually flush log files (issue #128)
- Introduced command line arg to enable/disable logging flag using `--logging-flags` param (issue #129)
Expand Down
2 changes: 1 addition & 1 deletion doc/RELEASE-NOTES-v9.60
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ API changes: No
= BUG FIXES =
==========================

- Double free corrpution when sharing storage
- Double free corruption when sharing storage
- Unused variable warning on Windows regarding "nextTok_" (issue #161)

==========================
Expand Down
17 changes: 17 additions & 0 deletions easyloggingpp.pri
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
QT += core

CONFIG += c++11

INCLUDEPATH += $$PWD/src

DEFINES += ELPP_QT_LOGGING \
ELPP_STL_LOGGING \
ELPP_STRICT_SIZE_CHECK ELPP_UNICODE \
ELPP_MULTI_LOGGER_SUPPORT \
ELPP_THREAD_SAFE \
ELPP_UNICODE \
ELPP_NO_DEFAULT_LOG_FILE

SOURCES += $$PWD/src/easylogging++.cc

HEADERS += $$PWD/src/easylogging++.h
2 changes: 1 addition & 1 deletion samples/Qt/fast-dictionary/listwithsearch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void ListWithSearch::performSearch(void)
} else {
LOG(INFO) << "Performing search... [" << txtSearchCriteria->text().toStdString() << "]";
for (int i = items.count() - 1; i >= 0; --i) {
if (items.at(i)->text().startsWith(txtSearchCriteria->text(), searchBehaviour_ == kCaseSensative ?
if (items.at(i)->text().startsWith(txtSearchCriteria->text(), searchBehaviour_ == kCaseSensitive ?
Qt::CaseSensitive : Qt::CaseInsensitive)) {
list->insertItem(i, items.at(i));
}
Expand Down
4 changes: 2 additions & 2 deletions samples/Qt/fast-dictionary/listwithsearch.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class ListWithSearch : public QWidget

public:
static int kSearchBarHeight;
enum kBehaviour { kCaseInsensative, kCaseSensative };
enum kBehaviour { kCaseInsensitive, kCaseSensitive };

explicit ListWithSearch(int searchBehaviour_ = kCaseSensative, QWidget *parent = 0);
explicit ListWithSearch(int searchBehaviour_ = kCaseSensitive, QWidget *parent = 0);
virtual ~ListWithSearch();
void add(const QString& item);
void resizeEvent(QResizeEvent *);
Expand Down
2 changes: 1 addition & 1 deletion samples/Qt/fast-dictionary/mainwindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ MainWindow::MainWindow(QWidget *parent) :
{
ui->setupUi(this);
this->setWindowTitle("Fast Dictionary Sample - Easylogging++");
list = new ListWithSearch(ListWithSearch::kCaseInsensative, this);
list = new ListWithSearch(ListWithSearch::kCaseInsensitive, this);
this->setGeometry(0, 0, 800, 600);
initializeDictionary("words.txt");
list->setFocus();
Expand Down
2 changes: 1 addition & 1 deletion samples/Qt/file-splitter-joiner/partprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,6 @@ void PartProcessor::run(void) {
status = merge();
}
if (status == -1) {
LOG(ERROR) << "Error occured while " << (processType == kSplit ? "splitting" : "merging");
LOG(ERROR) << "Error occurred while " << (processType == kSplit ? "splitting" : "merging");
}
}
2 changes: 1 addition & 1 deletion samples/STL/crash.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// This file is part of Easylogging++ samples
//
// Demonstration on how crashes are handled. You can set second argument of this progam to `y`
// Demonstration on how crashes are handled. You can set second argument of this program to `y`
// and application will not abort before crash is handled
//
// Revision 1.1
Expand Down
2 changes: 1 addition & 1 deletion samples/STL/occasional.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is part of Easylogging++ samples
//
// Sample to demonstrate using occasionals and other hit counts based logging
// Sample to demonstrate using occasional and other hit count based logging
//
// Revision 1.2
// @author mkhan3189
Expand Down
Loading

0 comments on commit fa10a79

Please sign in to comment.