LOG4CPP::PROPERTYCONFIGURATORIMPL(3)

πŸ“¦
version 1.1.4 Β· 3 versions
, in opensuse-leap 16.0

hey bestie πŸ’– welcome to the Library Functions Manual page for log4cpp::P...guratorImpl(3) from log4cpp β€” yes, the name is giving truncated, but we move. ✨

🌸 NAME 🌸

log4cpp::PropertyConfiguratorImpl

✨ SYNOPSIS ✨

#include <PropertyConfiguratorImpl.hh>

πŸŽ€ Public Types πŸŽ€

  • typedef std::map< std::string, Appender * > AppenderMap β€” bestie, AppenderMap is literally a map from std::string to Appender *. πŸ—ΊοΈ

🫢 Public Member Functions 🫢

  • PropertyConfiguratorImpl () β€” the constructor, no arguments, slay.
  • virtual ~PropertyConfiguratorImpl () β€” the virtual destructor.
  • virtual void doConfigure (const std::string &initFileName) β€” virtual doConfigure that takes initFileName.
  • virtual void doConfigure (std::istream &in) β€” virtual doConfigure that takes in as a std::istream &.

🌈 Protected Member Functions 🌈

  • void configureCategory (const std::string &categoryname) β€” configure the given category. πŸ’…
  • void getCategories (std::vector< std::string > &categories) const β€” Get a list of categories for which we should do the configuration.
  • void instantiateAllAppenders () β€” the all-appenders instantiator, no extra deets on this one.
  • Appender * instantiateAppender (const std::string &name) β€” Intantiate and configure the appender referred to by the given name. πŸ¦‹
  • void setLayout (Appender *appender, const std::string &name) β€” Method for instantiating and configuring the layouts associated with each appender.

πŸ“ Protected Attributes πŸ“

  • Properties _properties
  • AppenderMap _allAppenders

πŸ’– Member Typedef Documentation πŸ’–

The docs spell it out fully like this:

typedef std::map<std::string, Appender*> log4cpp::PropertyConfiguratorImpl::AppenderMap

🧚 Constructor & Destructor Documentation 🧚

  • log4cpp::PropertyConfiguratorImpl::PropertyConfiguratorImpl ()
  • log4cpp::PropertyConfiguratorImpl::~PropertyConfiguratorImpl () [virtual]

πŸ’… Member Function Documentation πŸ’…

πŸ“ configureCategory

void log4cpp::PropertyConfiguratorImpl::configureCategory (const std::string & categoryname) [protected]

configure the given category. This includes setting its Priority and adding any Appenders.

Todo: setting other properties like additivity.

Parameters:

  • categoryname β€” Name of the category to configure. The name rootCategory refers to the root Category.

Exceptions: ConfigureFailure if the method encountered a read or syntax error.


🌸 doConfigure (string overload)

void log4cpp::PropertyConfiguratorImpl::doConfigure (const std::string & initFileName) [virtual]

Parameters:

  • initFileName

Exceptions: ConfigureFailure if the method encountered a read or syntax error.


πŸ¦‹ doConfigure (stream overload)

void log4cpp::PropertyConfiguratorImpl::doConfigure (std::istream & in) [virtual]

Parameters:

  • in

Exceptions: ConfigureFailure if the method encountered a read or syntax error.


πŸŽ€ getCategories

void log4cpp::PropertyConfiguratorImpl::getCategories (std::vector< std::string > & categories) const [protected]

Get a list of categories for which we should do the configuration. Get the categories contained within the map of properties.

This simply extracts the categories from the map.

Parameters:

  • categories β€” Reference to a list which is to receive the list of categories.

Since the category looks something like category.xxxxx.yyy.zzz, we need to search the entire map to figure out which properties are category listings. Seems like there might be a more elegant solution.


🌈 instantiateAllAppenders

void log4cpp::PropertyConfiguratorImpl::instantiateAllAppenders () [protected]

🧚 instantiateAppender

Appender * log4cpp::PropertyConfiguratorImpl::instantiateAppender (const std::string & name) [protected]

Intantiate and configure the appender referred to by the given name. This method searches the map to find all configuration parameters for the appender, and adds the appender to the given category. This isn't very general in the sense that it will need to be modified for each type of appender and layout. A more general solution would be to define an "options" interface for each appender and layout, so that we can simply call this method with a list of options instead of needing to know what is or is not available. This would also require some generic way of instantiating an object for which we have no knowledge. An "AppenderFactory" could be used which maps the given type to an actual object class registered with the factory (?? is this possible?).

Parameters:

  • name β€” String containing the name of the type of appender to be instantiated.

πŸ’œ setLayout

void log4cpp::PropertyConfiguratorImpl::setLayout (Appender * appender, const std::string & name) [protected]

Method for instantiating and configuring the layouts associated with each appender.

Parameters:

  • appender β€” Appender to which we are setting this layout.
  • name β€” Name in the properties of this appender.

πŸ”₯ Member Data Documentation πŸ”₯

  • AppenderMap log4cpp::PropertyConfiguratorImpl::_allAppenders [protected]
  • Properties log4cpp::PropertyConfiguratorImpl::_properties [protected]

⭐ Author ⭐

Generated automatically by Doxygen for log4cpp from the source code.


And that's the whole page, bestie! πŸ’œ This one is log4cpp Version 1.1, filed under log4cpp::P...guratorImpl(3), and yes β€” it was generated automatically by Doxygen for log4cpp from the source code. Bye bestie, go configure something iconic! 🫢✨

πŸ“¦ where this page comes from