Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion include/bmi_topmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ int init_config(const char* config_file, topmodel_model* model);

int read_init_config(const char* config_file, topmodel_model* model);


#if defined(__cplusplus)
}
#endif
Expand Down
28 changes: 7 additions & 21 deletions include/logger.h
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
#ifndef LOGGER_H
#define LOGGER_H

#include <stdarg.h> // for variable args: va_list
#include <stdbool.h>

typedef enum {
NONE = 0,
DEBUG = 1,
INFO = 2,
WARNING = 3,
SEVERE = 4,
FATAL = 5,
} LogLevel;

// Public Methods
LogLevel GetLogLevel(void);
bool IsLoggingEnabled(void);
void Log(LogLevel messageLevel, const char* message, ...);

#endif // LOGGER_H
#ifndef TOPMODEL_LOGGER_H
#define TOPMODEL_LOGGER_H
#include "ewts/module_constants.h"
#define EWTS_ID EWTS_ID_TOPMODEL
#include "ewts/logger.h"
#include "ewts/log_levels.h"
#endif /* TOPMODEL_LOGGER_H */
7 changes: 7 additions & 0 deletions src/bmi_topmodel.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,13 @@ static int Initialize(Bmi *self, const char *cfg_file) {
topmodel_model *topmodel;
topmodel = (topmodel_model *)self->data;

// Initialize the Error, Warning and Trapping System
#ifdef EWTS_HAVE_NGEN_BRIDGE
EwtsInit(EWTS_ID_TOPMODEL, true);
#else
EwtsInit(EWTS_ID_TOPMODEL, false);
#endif

// Read and setup data from file
int ret = init_config(cfg_file, topmodel);
if (ret != BMI_SUCCESS)
Expand Down
Loading
Loading