logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

log4tango::PatternLayout

Author

       Generated automatically by Doxygen for log4tango from the source code.

Version 5.0.1                                    Fri Feb 14 2020                     log4tango::PatternLayout(3)

Constructor & Destructor Documentation

log4tango::PatternLayout::PatternLayout()log4tango::PatternLayout::~PatternLayout()[virtual]

Member Data Documentation

constchar*log4tango::PatternLayout::BASIC_CONVERSION_PATTERN='%R%p%c%m%n'[static]
       A conversion pattern equivalent to the BasicLayout.

Member Function Documentation

voidlog4tango::PatternLayout::clear_conversion_pattern()[virtual]std::stringlog4tango::PatternLayout::format(constLoggingEvent&event)[virtual]
       Formats the LoggingEvent in the style set by the set_conversion_pattern call. By default, set to '%%m%%n'

       Reimplemented from log4tango::Layout.

   std::stringlog4tango::PatternLayout::get_conversion_pattern()const[virtual]intlog4tango::PatternLayout::set_conversion_pattern(conststd::string&conversionPattern)[virtual]
       Sets the format of log lines handled by this PatternLayout. By default, set to '%%m%%n'.
        Format characters are as follows:

       • %%%% - a single percent sign
       • %c - the logger
       • %d - the date
          Date  format:  The  date  format character may be followed by a date format specifier enclosed between
         braces. For example, %d{%H:%M:%S,%l} or %d{%d %m %Y %H:%M:%S,%l}. If no date format specifier is  given
         then  the  following  format  is used: 'Wed Jan 02 02:03:55 1980'. The date format specifier admits the
         same syntax as the ANSI C function strftime, with 1 addition. The addition  is  the  specifier  %l  for
         milliseconds, padded with zeros to make 3 digits.
       • %m - the message
       • %n - the platform specific line separator
       • %p - the level
       • %r - milliseconds since this layout was created.
       • %R - seconds since Jan 1, 1970
       • %u - clock ticks since process start
       • %x - the NDC
       ParametersconversionPattern the conversion pattern
       ExceptionsConfigureFailure if the pattern is invalid

Name

       log4tango::PatternLayout

Synopsis

       #include <PatternLayout.hh>

       Inherits log4tango::Layout.

   Classes
       class PatternComponentPublicMemberFunctionsPatternLayout ()
       virtual ~PatternLayout ()
       virtual std::string format (const LoggingEvent &event)
           Formats the LoggingEvent in the style set by the set_conversion_pattern call.
       virtual int set_conversion_pattern (const std::string &conversionPattern)
           Sets the format of log lines handled by this PatternLayout.
       virtual std::string get_conversion_pattern () const
       virtual void clear_conversion_pattern ()

   StaticPublicAttributes
       static const char * BASIC_CONVERSION_PATTERN = '%R %p %c %m%n'
           A conversion pattern equivalent to the BasicLayout.

See Also