Azure IoT common library
Fork of azure_c_shared_utility by
consolelogger.c@6:c55b013dfc2a, 2016-07-01 (annotated)
- Committer:
- Azure.IoT Build
- Date:
- Fri Jul 01 10:43:23 2016 -0700
- Revision:
- 6:c55b013dfc2a
- Child:
- 7:1af47e3a19b6
1.0.10
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Azure.IoT Build | 6:c55b013dfc2a | 1 | // Copyright (c) Microsoft. All rights reserved. |
Azure.IoT Build | 6:c55b013dfc2a | 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. |
Azure.IoT Build | 6:c55b013dfc2a | 3 | |
Azure.IoT Build | 6:c55b013dfc2a | 4 | #include <stdlib.h> |
Azure.IoT Build | 6:c55b013dfc2a | 5 | #ifdef _CRTDBG_MAP_ALLOC |
Azure.IoT Build | 6:c55b013dfc2a | 6 | #include <crtdbg.h> |
Azure.IoT Build | 6:c55b013dfc2a | 7 | #endif |
Azure.IoT Build | 6:c55b013dfc2a | 8 | #include <stdarg.h> |
Azure.IoT Build | 6:c55b013dfc2a | 9 | #include <stdio.h> |
Azure.IoT Build | 6:c55b013dfc2a | 10 | #include "azure_c_shared_utility/xlogging.h" |
Azure.IoT Build | 6:c55b013dfc2a | 11 | |
Azure.IoT Build | 6:c55b013dfc2a | 12 | void consolelogger_log(LOG_CATEGORY log_category,unsigned int options, const char* format, ...) |
Azure.IoT Build | 6:c55b013dfc2a | 13 | { |
Azure.IoT Build | 6:c55b013dfc2a | 14 | va_list args; |
Azure.IoT Build | 6:c55b013dfc2a | 15 | va_start(args, format); |
Azure.IoT Build | 6:c55b013dfc2a | 16 | (void)vprintf(format, args); |
Azure.IoT Build | 6:c55b013dfc2a | 17 | va_end(args); |
Azure.IoT Build | 6:c55b013dfc2a | 18 | |
Azure.IoT Build | 6:c55b013dfc2a | 19 | (void)log_category; |
Azure.IoT Build | 6:c55b013dfc2a | 20 | if (options & LOG_LINE) |
Azure.IoT Build | 6:c55b013dfc2a | 21 | { |
Azure.IoT Build | 6:c55b013dfc2a | 22 | (void)printf("\r\n"); |
Azure.IoT Build | 6:c55b013dfc2a | 23 | } |
Azure.IoT Build | 6:c55b013dfc2a | 24 | } |