Skip to content

Commit

Permalink
closes #10 FATAL log disable during compilation.
Browse files Browse the repository at this point in the history
  • Loading branch information
abumq committed Jan 6, 2013
1 parent b7804b2 commit 92870d3
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,13 @@ To disable level specific log while compiling here are macros to define;
* `_DISABLE_WARNING_LOGS`
* `_DISABLE_ERROR_LOGS`
* `_DISABLE_FATAL_LOGS`
* `_DISABLE_STATUS_LOGS`
* `_DISABLE_HINT_LOGS`
* `_DISABLE_STATUS`
* `_DISABLE_HINTS`
* `_DISABLE_PERFORMANCE_LOGS`
As an example if you wish to disable just debug and status logs while `_ENABLE_DEBUG_LOGS` and `_ENABLE_STATUS` is set to 1 in `easylogging++.h`, you may compile with following line;
```
g++ main.cpp -o main-exec -D _DISABLE_DEBUG_LOGS -D _DISABLE_STATUS_LOGS
g++ main.cpp -o main-exec -D _DISABLE_DEBUG_LOGS -D _DISABLE_STATUS
```
This will disable debug logs and status updates in main-exec binary.
Expand Down
8 changes: 4 additions & 4 deletions easylogging++.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////
// //
// easylogging++.h - Core of EasyLogging++ //
// EasyLogging++ v3.15 //
// EasyLogging++ v3.16 //
// Cross platform logging made easy for C++ applications //
// Author Majid Khan <[email protected]> //
// http://www.icplusplus.com //
Expand Down Expand Up @@ -168,8 +168,8 @@ const bool SHOW_START_FUNCTION_LOG = false;
#define _WARNING_LOG ((_ENABLE_WARNING_LOGS) && !defined(_DISABLE_WARNING_LOGS))
#define _ERROR_LOG ((_ENABLE_ERROR_LOGS) && !defined(_DISABLE_ERROR_LOGS))
#define _PERFORMANCE_LOG ((_ENABLE_PERFORMANCE_LOGS) && !defined(_DISABLE_PERFORMANCE_LOGS))
#define _STATUS_LOG ((_ENABLE_STATUS) && !defined(_DISABLE_STATUS_LOGS))
#define _HINT_LOG ((_ENABLE_HINTS) && !defined(_DISABLE_HINT_LOGS))
#define _STATUS_LOG ((_ENABLE_STATUS) && !defined(_DISABLE_STATUS))
#define _HINT_LOG ((_ENABLE_HINTS) && !defined(_DISABLE_HINTS))
#define _FATAL_LOG ((_ENABLE_FATAL_LOGS) && !defined(_DISABLE_FATAL_LOGS))

//
Expand Down Expand Up @@ -506,7 +506,7 @@ static void buildFormat(const char* func, const char* file, const unsigned long
#else
#define ERROR(x)
#endif //_ERROR_LOG
#if _ENABLE_FATAL_LOGS
#if _FATAL_LOG
#define FATAL(logStr) WRITE_LOG("FATAL",logStr)
#else
#define FATAL(x)
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
include_once "../../format.php";
global $webAddr;
$currentVersion = "v3.15";
$currentVersion = "v3.16";
?>
<script language='javascript'>
document.title='EasyLogging++ - C++ Tools';
Expand Down
Binary file modified samples/bin/many_logs.cpp.bin
Binary file not shown.
Binary file modified samples/bin/time_tracker.cpp.bin
Binary file not shown.
Binary file modified samples/bin/time_waster.cpp.bin
Binary file not shown.

0 comments on commit 92870d3

Please sign in to comment.