OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
olog_loader.c
Go to the documentation of this file.
1 #include "olog.h"
2 #include "olog/loader.h"
3 #include "olog/stream.h"
4 #include "olog/streamf.h"
5 
6 #include <stdlib.h>
7 
11 
13  if (!olog_global_log) {
14  olog_streamf_arguments streamf_args = {
15  .stream = stderr,
16  .format = "%t [%u] %s"
17  };
18  olog_backend backends[] = {
21  { 0 }
22  };
23  olog_global_log = olog_create(backends, stderr);
24  }
25  return olog_global_log;
26 }
27 
29  if (olog_global_log) {
31  }
32 }
olog * olog_global_log
Definition: olog_loader.c:8
#define OLOG_INFO
Definition: olog.h:43
#define OLOG_WARNING
Definition: olog.h:45
#define NULL
Definition: decode_rs.h:63
olog * olog_create(olog_backend *backends, FILE *stream)
Definition: olog.c:15
olog_backend olog_backend_stream(FILE *stream, int8_t min_log_level, int8_t max_log_level)
Definition: stream.c:13
#define OLOG_ERROR
Definition: olog.h:46
A simple logger, capable of dispatching log events to multiple end points.
olog_backend olog_backend_streamf(olog_streamf_arguments *arguments, int8_t min_log_level, int8_t max_log_level)
Definition: streamf.c:362
char * olog_global_config
Definition: olog_loader.c:9
void olog_destroy_default()
Definition: olog_loader.c:28
olog_backend olog_backends_end
Definition: olog_loader.c:10
#define OLOG_EMERGENCY
Definition: olog.h:49
Definition: olog.c:11
olog * olog_load_default()
Definition: olog_loader.c:12
void olog_destroy(olog *olog)
Definition: olog.c:60