31 #define DLT_ENV_LL_SET_INCREASE 10 73 for (i = 0; (i<4) && (**env !=
':') && (**env != 0); ++i)
79 if ((0 != **env) && (
':' == **env))
110 while (ch && (count < res_len-1) && (ch !=
';'))
112 if (ch >=
'A' && ch <=
'Z')
114 result[count] = ch +
'a' -
'A';
125 if (!ch || (ch ==
';'))
138 char result[strlen(
"verbose")+1];
151 if (strncmp(
"default", result,
sizeof(result)) == 0)
155 else if (strncmp(
"off", result,
sizeof(result)) == 0)
159 else if (strncmp(
"fatal", result,
sizeof(result)) == 0)
163 else if (strncmp(
"error", result,
sizeof(result)) == 0)
167 else if (strncmp(
"warning", result,
sizeof(result)) == 0)
171 else if (strncmp(
"info", result,
sizeof(result)) == 0)
175 else if (strncmp(
"debug", result,
sizeof(result)) == 0)
179 else if (strncmp(
"verbose", result,
sizeof(result)) == 0)
252 if ((**env >=
'0') && (**env <
'7'))
267 if ((**env ==
';') || (**env == 0))
380 old_set = ll_set->
item;
443 }
while (**env != 0);
490 if ((!item) || (!apid) || (!ctid))
495 if (item->
appId[0] == 0)
497 if (item->
ctxId[0] == 0)
513 if (item->
ctxId[0] == 0)
539 if ((!ll_set) || (!apid) || (!ctid))
547 for (i = 0; i<ll_set->
num_elem; ++i)
int dlt_env_adjust_ll_from_env(dlt_env_ll_set const *const ll_set, char const *const apid, char const *const ctid, int const ll)
adjust log-level based on values given through environment
int dlt_env_extract_ll_set(char **const env, dlt_env_ll_set *const ll_set)
extract all items out of string
int dlt_env_extract_ll_item(char **const env, dlt_env_ll_item *const item)
extract one item out of string
int dlt_env_extract_symbolic_ll(char **const env, int8_t *ll)
int dlt_env_ids_match(char const *const a, char const *const b)
check if two ids match
int dlt_env_extract_id(char **const env, char *id)
extract id out of given string
int dlt_env_init_ll_set(dlt_env_ll_set *const ll_set)
initialize ll_set
int dlt_env_ll_item_get_matching_prio(dlt_env_ll_item const *const item, char const *const apid, char const *const ctid)
check if (and how) apid and ctid match with given item
int dlt_env_increase_ll_set(dlt_env_ll_set *const ll_set)
increase size of ll_set by LL_SET_INCREASE elements
int dlt_env_helper_to_lower(char **const env, char *result, int const res_len)
convert a given string to lower-case
void dlt_env_free_ll_set(dlt_env_ll_set *const ll_set)
release ll_set
holds all initial log-levels given via environment variable DLT_INITIAL_LOG_LEVEL ...
holds initial log-level for given appId:ctxId pair
#define DLT_ENV_LL_SET_INCREASE
int dlt_env_extract_ll(char **const env, int8_t *ll)
extract log-level out of given string