18#ifndef _LOG4CXX_ECS_LAYOUT_H
19#define _LOG4CXX_ECS_LAYOUT_H
89 LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(ECSLayoutPrivate, m_priv)
This layout outputs each event as a single line JSON object using the field names of the Elastic Comm...
Definition ecslayout.h:87
bool activateOptions() override
Activate the options that were previously set with calls to option setters.
const LogString & getServiceName() const
The service.name field value.
void setServiceName(const LogString &newValue)
Use newValue as the service.name field value.
LogString getContentType() const override
Returns the content type output by this layout, i.e "application/json".
bool ignoresThrowable() const override
The ECS layout handles the throwable contained in logging events.
Definition ecslayout.h:212
const LogString & getServiceVersion() const
The service.version field value.
const LogString & getServiceEnvironment() const
The service.environment field value.
void format(LogString &output, const spi::LoggingEventPtr &event) const override
Append the attributes of event as a single line JSON object onto output.
void setLocationInfo(bool newValue)
Include the source code location (the log.origin.
const LogString & getServiceNodeName() const
The service.node.name field value.
void setServiceEnvironment(const LogString &newValue)
Use newValue as the service.environment field value, e.g.
const LogString & getEventDataset() const
The event.dataset field value (the ServiceName option value when EventDataset is empty).
void setServiceNodeName(const LogString &newValue)
Use newValue as the service.node.name field value, which identifies a particular instance of a servic...
bool getLocationInfo() const
Is the source code location of the logging request included?
void setServiceVersion(const LogString &newValue)
Use newValue as the service.version field value.
void setEventDataset(const LogString &newValue)
Use newValue as the event.dataset field value.
void setOption(const LogString &option, const LogString &value) override
Override this method to set option to value.
Extend this abstract class to create your own log layout format.
Definition layout.h:33
std::basic_string< logchar > LogString
Definition logstring.h:51
LOG4CXX_PTR_DEF(Appender)
#define LOG4CXX_CAST_ENTRY(Interface)
Definition object.h:153
#define END_LOG4CXX_CAST_MAP()
Definition object.h:147
#define DECLARE_LOG4CXX_OBJECT(object)
Definition object.h:41
#define LOG4CXX_CAST_ENTRY_CHAIN(Interface)
Definition object.h:159
#define BEGIN_LOG4CXX_CAST_MAP()
Definition object.h:141