38 lines
694 B
C++
38 lines
694 B
C++
/**
|
|
* @RDE_HEADER@
|
|
* Building Config - logging facility
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*/
|
|
|
|
#include "logger.h"
|
|
|
|
#include <NGLLogger/NGLLoggerBootstrap.h>
|
|
|
|
namespace N_LogView
|
|
{
|
|
|
|
LOGGER_T getLogger(const char *name)
|
|
{
|
|
static const char ns[] = "LogView.";
|
|
std::string loggerName;
|
|
const size_t len = strlen(name);
|
|
loggerName.reserve(sizeof(ns) + len);
|
|
loggerName.append(ns, sizeof(ns) - 1);
|
|
loggerName.append(name, len);
|
|
|
|
try
|
|
{
|
|
return NGL::NGLLoggerBootstrap::getNGLRootLogger().
|
|
getNGLLogger(loggerName);
|
|
}
|
|
catch (const std::exception &ex)
|
|
{
|
|
fprintf(stderr, "Error retrieving logger: %s", ex.what());
|
|
abort();
|
|
}
|
|
}
|
|
|
|
} // namespace LogView
|