-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs #41 @4h added facility factory to logger::syslog_facility, facil…
…ities has moved out of logger/definitions.hpp into dedicated source code files. > **WARN** we failed to get GMock running.
- Loading branch information
1 parent
8d1a38e
commit 972d9de
Showing
10 changed files
with
75 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* author: herbert koelman ([email protected]) | ||
*/ | ||
|
||
//#include "logger/config.h" | ||
#include "logger/facilities.hpp" | ||
|
||
#include <mutex> | ||
#include <shared_mutex> | ||
|
@@ -19,6 +19,7 @@ | |
#define CPP_LOGGER_SINKS_HPP | ||
|
||
#include "logger/definitions.hpp" | ||
#include <logger/facilities.hpp> | ||
|
||
#define MAXECIDLEN 64 | ||
|
||
|
@@ -74,15 +75,16 @@ namespace logger { | |
}; | ||
|
||
/** @return logger's facility (see logger::log_facility) */ | ||
const log_facility *facility() const { | ||
const log_facility_ptr facility() const { | ||
|
||
return _facility; | ||
}; | ||
|
||
/** set faclity name | ||
* | ||
* @param facility facility name | ||
*/ | ||
void set_facility(log_facility *facility); | ||
void set_facility(log_facility_ptr facility); | ||
|
||
/** change the current ecid. | ||
* | ||
|
@@ -122,10 +124,11 @@ namespace logger { | |
std::string _name; //!< logging domain name (as for now, this is equal to the logger name) | ||
std::string _pattern;//!< message pattern (layout) | ||
std::string _pname; //!< program name | ||
log_facility *_facility; //!< current facility class | ||
std::string _ecid; //!< execution control ID. Helps to track everything that was logged by one business operation | ||
log_level _level; //!< current logging level | ||
|
||
log_facility_ptr _facility; //!< current facility class | ||
|
||
private: | ||
std::mutex _mutex; //!< used to protect access to static class data | ||
std::shared_mutex _shared_mutex; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters