/*
 * SPDX-FileCopyrightText: 2000-2002 Copyright LifeLine Networks BV (www.lifeline.nl)
 * SPDX-FileCopyrightText: 2000-2002 Copyright Bastiaan Bakker
 * SPDX-FileCopyrightText: 2004 Copyright contributors to the cppTango project
 *
 * SPDX-License-Identifier: LGPL-3.0-or-later
 */

#ifndef TANGO_COMMON_LOG4TANGO_LAYOUT_H
#define TANGO_COMMON_LOG4TANGO_LAYOUT_H

#include <tango/common/log4tango/LoggingEvent.h>
#include <tango/common/log4tango/Portability.h>

#include <string>

namespace log4tango
{

//-----------------------------------------------------------------------------
// class : Appender (abstract class)
//-----------------------------------------------------------------------------
class Layout
{
  public:
    /**
     * Constructor for Layout.
     **/
    Layout() { }

    /**
     * Destructor for Layout.
     **/
    virtual ~Layout() { }

    /**
     * Formats the LoggingEvent data to a string that appenders can log.
     * Overload this method to create your own layout format.
     * @param event The LoggingEvent.
     * @returns an appendable string.
     **/
    virtual std::string format(const LoggingEvent &event);
};

} // namespace log4tango

#endif // TANGO_COMMON_LOG4TANGO_LAYOUT_H
