<p>This is really annoying indeed - function called to log does not give a ... care for what is the user setting<br>
Please fix ? :)</p>
<pre><code>src/store.c
void log_message(int log_lvl, const char *format, ...) {
va_list ap;
char *msg = malloc(1000*sizeof(char));
va_start(ap, format);
if (msg) {
vsnprintf(msg, 1000, format, ap);
switch (log_lvl) {
case STORE_LOGLVL_DEBUG:
fprintf(stderr, "debug: %s\n", msg);
break;
case STORE_LOGLVL_INFO:
fprintf(stderr, "info: %s\n", msg);
break;
case STORE_LOGLVL_WARNING:
fprintf(stderr, "WARNING: %s\n", msg);
break;
case STORE_LOGLVL_ERR:
fprintf(stderr, "ERROR: %s\n", msg);
break;
}
free(msg);
fflush(stderr);
}
va_end(ap);
}
</code></pre>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/mod_tile/issues/155#issuecomment-412769034">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AD2-7oqeWZo2TzfMzezkQ0XY6oLyBcTbks5uQm8sgaJpZM4Mz5IH">mute the thread</a>.<img src="https://github.com/notifications/beacon/AD2-7kp7-pKNxuSkalyEcA67lXcwhff3ks5uQm8sgaJpZM4Mz5IH.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/openstreetmap/mod_tile","title":"openstreetmap/mod_tile","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/mod_tile"}},"updates":{"snippets":[{"icon":"PERSON","message":"@nick4u in #155: This is really annoying indeed - function called to log does not give a ... care for what is the user setting \r\nPlease fix ? :)\r\n```\r\nsrc/store.c\r\n\r\nvoid log_message(int log_lvl, const char *format, ...) { \r\n va_list ap; \r\n char *msg = malloc(1000*sizeof(char)); \r\n \r\n va_start(ap, format); \r\n \r\n \r\n \r\n if (msg) { \r\n vsnprintf(msg, 1000, format, ap); \r\n switch (log_lvl) { \r\n case STORE_LOGLVL_DEBUG: \r\n fprintf(stderr, \"debug: %s\\n\", msg); \r\n break; \r\n case STORE_LOGLVL_INFO: \r\n fprintf(stderr, \"info: %s\\n\", msg); \r\n break; \r\n case STORE_LOGLVL_WARNING: \r\n fprintf(stderr, \"WARNING: %s\\n\", msg); \r\n break; \r\n case STORE_LOGLVL_ERR: \r\n fprintf(stderr, \"ERROR: %s\\n\", msg); \r\n break; \r\n } \r\n free(msg); \r\n fflush(stderr); \r\n } \r\n va_end(ap); \r\n} \r\n```"}],"action":{"name":"View Issue","url":"https://github.com/openstreetmap/mod_tile/issues/155#issuecomment-412769034"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/mod_tile/issues/155#issuecomment-412769034",
"url": "https://github.com/openstreetmap/mod_tile/issues/155#issuecomment-412769034",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Re: [openstreetmap/mod_tile] mod tile ignores apache Log settings. (#155)",
"sections": [
{
"text": "",
"activityTitle": "**Jakub Juraszek**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@nick4u",
"facts": [
]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"openstreetmap/mod_tile\",\n\"issueId\": 155,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close issue",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"openstreetmap/mod_tile\",\n\"issueId\": 155\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/openstreetmap/mod_tile/issues/155#issuecomment-412769034"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 214929927\n}"
}
],
"themeColor": "26292E"
}
]</script>