1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
//----------------------------------*-C++-*----------------------------------//
// Copyright 2020-2023 UT-Battelle, LLC, and other Celeritas developers.
// See the top-level COPYRIGHT file for details.
// SPDX-License-Identifier: (Apache-2.0 OR MIT)
//---------------------------------------------------------------------------//
//! \file LoggerTypes.cpp
//---------------------------------------------------------------------------//
#include "VecGeom/management/LoggerTypes.h"
#include <cassert>
namespace vecgeom {
//---------------------------------------------------------------------------//
/*!
* Get the plain text equivalent of the LogLevel enum.
*/
char const *to_cstring(LogLevel lev)
{
static const char *const data[] = {
"debug", "diagnostic", "status", "info", "warning", "error", "critical",
};
assert(size_t(lev) * sizeof(const char *) < sizeof(data));
return data[static_cast<int>(lev)];
}
//---------------------------------------------------------------------------//
} // namespace vecgeom
|