//
// Copyright (c) 2010-2012 Linaro Limited
//
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the MIT License which accompanies
// this distribution, and is available at
// http://www.opensource.org/licenses/mit-license.php
//
// Contributors:
//     Alexandros Frantzis <alexandros.frantzis@linaro.org>
//     Jesse Barker <jesse.barker@linaro.org>
//
#ifndef LOG_H_
#define LOG_H_

#include <string>

class Log
{
public:
    static void init(const std::string& appname, bool do_debug = false)
    {
        appname_ = appname;
        do_debug_ = do_debug;
    }
    // Emit an informational message
    static void info(const char *fmt, ...);
    // Emit a debugging message
    static void debug(const char *fmt, ...);
    // Emit an error message
    static void error(const char *fmt, ...);
    // Explicit flush of the log buffer
    static void flush();
    // A prefix constant that informs the logging infrastructure that the log
    // message is a continuation of a previous log message to be put on the
    // same line.
    static const std::string continuation_prefix;
private:
    // A constant for identifying the log messages as originating from a
    // particular application.
    static std::string appname_;
    // Indicates whether debug level messages should generate any output
    static bool do_debug_;
};

#endif /* LOG_H_ */
