#ifndef Foundation_Logger_H_
#define Foundation_Logger_H_

#include "glog/logging.h"

#pragma message("'foundation/FoundationLogger.h' is deprecated. Use 'foundation/simple_log.hpp' instead.")

/*
From glog/log_severity.h

static const int INFO = 0;
static const int WARNING = 1;
static const int GERROR = 2;
static const int FATAL = 3;
static const int NUM_SEVERITIES = 4;

For log levels

Notice: In the macros, such as LOG(), you can use these names directly, otherwise you must
use namespace google
*/

namespace Tn { 

    namespace Foundation {

        /**
        * FoundationLoggerRAII is used to initialize and cleanup GLOG
        */
        class FoundationLoggerRAII
        {

        public:
            /**
            * Constructor, initialization for GLOG
            *@param argv parameter passed in main
            *@param stdErrLogLevel set severity level higher than/equal to which will be logger to stderr
            */
            FoundationLoggerRAII(char const *argv, int stdErrLogLevel = google::GERROR)
            {
                google::InitGoogleLogging(argv);

                google::SetStderrLogging(stdErrLogLevel);
            }

            /**
            * Destructor, cleanup GLOG setting
            */
            ~FoundationLoggerRAII()
            {
                google::ShutdownGoogleLogging();
            }
        };

    } //end namespace Foundation

}//end namespace Tn

#endif //Foundation_Logger_H_
