LOG4CPP::PROPERTYCONFIGURATOR(3)

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

πŸ’– NAME πŸ’–

okay so bestie, welcome to the log4cpp::PropertyConfigurator(3) page β€” yes, we’re in the Library Functions Manual β€” and this whole page is about log4cpp::PropertyConfigurator, the property configurator that will read a config file using the same (or similar) format to the config file used by log4j. Slay. ✨


🌈 SYNOPSIS 🌈

#include <PropertyConfigurator.hh>

🌟 Static Public Member Functions

  • static void configure (const std::string &initFileName) β€” the static function to call when you want to configure from a file, bestie.

πŸ“ Detailed Description πŸ“

okay so let’s get into it: PropertyConfigurator will read a config file using the same (or similar) format to the config file used by log4j. That’s the whole vibe. πŸ’…

This file is in a standard Java "properties" file format. Very β€œyes, we’re doing Java-style properties, and we’re doing it fabulously.”

Example:

# a simple test config

log4j.rootCategory=DEBUG, rootAppender
log4j.category.sub1=A1
log4j.category.sub2=INFO
log4j.category.sub1.sub2=ERROR, A2

log4j.appender.rootAppender=org.apache.log4j.ConsoleAppender
log4j.appender.rootAppender.layout=org.apache.log4j.BasicLayout

log4j.appender.A1=org.apache.log4j.FileAppender
log4j.appender.A1.fileName=A1.log
log4j.appender.A1.layout=org.apache.log4j.BasicLayout

log4j.appender.A2=org.apache.log4j.ConsoleAppender
log4j.appender.A2.layout=org.apache.log4j.PatternLayout
log4j.appender.A2.layout.ConversionPattern=The message %m at time %d%n

πŸ•°οΈ Since

0.3.2 β€” that’s when this icon showed up, periodt. πŸŽ€


πŸ“š Member Function Documentation πŸ“š

πŸ› οΈ void log4cpp::PropertyConfigurator::configure (const std::string &initFileName) [static]

This is the static configure member function, and it takes the config file name. Main character energy, honestly. πŸ‘‘

Parameters

  • initFileName β€” the name of the config file you’re handing over. That’s the parameter, bestie.

Exceptions

  • ConfigureFailure if the method encountered a read or syntax error. 🫠 Not cute, but very important.

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for log4cpp from the source code. No cap β€” that’s literally what the Author section says. πŸ¦‹


Bye bestie 🫢 β€” footer vibe check: this page is from log4cpp Version 1.1, and the date slot is literally not printed on the original footer, so there’s no date to spill. πŸ’…βœ¨

πŸ“¦ where this page comes from