Skip to content

Commit

Permalink
check if log context was created
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Hernán Carle <[email protected]>
  • Loading branch information
pj892031 authored and Pablo Hernán Carle committed Mar 24, 2023
1 parent 679c594 commit d9bbcc2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1535,6 +1535,10 @@ int main(int argc, char **argv) {
zl_context.config = config;

LoggingContext *logContext = makeLoggingContext();
if (!logContext) {
ERROR(MSG_NO_LOG_CONTEXT);
exit(EXIT_FAILURE);
}
logConfigureStandardDestinations(logContext);

ConfigManager *configmgr = makeConfigManager(); /* configs,schemas,1,stderr); */
Expand Down
1 change: 1 addition & 0 deletions src/msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
#define MSG_CFG_INTERNAL_FAIL MSG_PREFIX "0071E" " Internal failure during validation, please contact support\n"
#define MSG_CFG_LOAD_FAIL MSG_PREFIX "0072E" " Launcher Could not load configurations\n"
#define MSG_CFG_SCHEMA_FAIL MSG_PREFIX "0073E" " Launcher Could not load schemas, status=%d\n"
#define MSG_NO_LOG_CONTEXT MSG_PREFIX "0074E" " Log context was not created\n"

#endif // MSG_H

Expand Down

0 comments on commit d9bbcc2

Please sign in to comment.