helics  3.5.2
logging.hpp
Go to the documentation of this file.
1 /*
2 Copyright (c) 2017-2024,
3 Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Sustainable
4 Energy, LLC. See the top-level NOTICE for additional details. All rights reserved.
5 SPDX-License-Identifier: BSD-3-Clause
6 */
7 #pragma once
8 
9 #include "../helics_enums.h"
10 
11 #include <string>
12 #include <unordered_map>
13 
14 namespace helics {
20 enum LogLevels : int {
27  CONNECTIONS =
29  INTERFACES =
35  FED = 99999
36 };
37 
38 extern const std::unordered_map<std::string, int> gLogLevelMap;
39 
40 LogLevels logLevelFromString(std::string_view level);
41 
42 std::string logLevelToString(LogLevels level);
43 
44 } // namespace helics
@ HELICS_LOG_LEVEL_ERROR
Definition: helics_enums.h:206
@ HELICS_LOG_LEVEL_SUMMARY
Definition: helics_enums.h:212
@ HELICS_LOG_LEVEL_CONNECTIONS
Definition: helics_enums.h:215
@ HELICS_LOG_LEVEL_DEBUG
Definition: helics_enums.h:223
@ HELICS_LOG_LEVEL_NO_PRINT
Definition: helics_enums.h:204
@ HELICS_LOG_LEVEL_PROFILING
Definition: helics_enums.h:208
@ HELICS_LOG_LEVEL_DATA
Definition: helics_enums.h:221
@ HELICS_LOG_LEVEL_INTERFACES
Definition: helics_enums.h:217
@ HELICS_LOG_LEVEL_DUMPLOG
Definition: helics_enums.h:202
@ HELICS_LOG_LEVEL_TIMING
Definition: helics_enums.h:219
@ HELICS_LOG_LEVEL_TRACE
Definition: helics_enums.h:225
@ HELICS_LOG_LEVEL_WARNING
Definition: helics_enums.h:210
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14
LogLevels
Definition: logging.hpp:20
@ ERROR_LEVEL
only print errors
Definition: logging.hpp:23
@ PROFILING
profiling log level
Definition: logging.hpp:24
@ SUMMARY
print/log summary information
Definition: logging.hpp:26
@ WARNING
print/log warning and errors
Definition: logging.hpp:25
@ DATA
print timing+data transmissions
Definition: logging.hpp:32
@ DEBUG
print data+additional debug info
Definition: logging.hpp:33
@ NO_PRINT
never print
Definition: logging.hpp:22
@ CONNECTIONS
print summary+federate level connection information
Definition: logging.hpp:27
@ INTERFACES
print connections+interface level connection information
Definition: logging.hpp:29
@ TIMING
print interfaces+timing(exec/grant/disconnect)
Definition: logging.hpp:31
@ FED
special logging command for message coming from a fed
Definition: logging.hpp:35
@ TRACE
trace level printing (all processed messages)
Definition: logging.hpp:34
@ DUMPLOG
only for dumplog
Definition: logging.hpp:21