1 | // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 | // for details. All rights reserved. Use of this source code is governed by a |
3 | // BSD-style license that can be found in the LICENSE file. |
4 | |
5 | #ifndef RUNTIME_PLATFORM_SYSLOG_H_ |
6 | #define RUNTIME_PLATFORM_SYSLOG_H_ |
7 | |
8 | #include <stdarg.h> |
9 | |
10 | #include "platform/globals.h" |
11 | |
12 | namespace dart { |
13 | |
14 | class Syslog { |
15 | public: |
16 | // Print formatted output for debugging. |
17 | static void Print(const char* format, ...) PRINTF_ATTRIBUTE(1, 2) { |
18 | va_list args; |
19 | va_start(args, format); |
20 | VPrint(format, args); |
21 | va_end(args); |
22 | } |
23 | |
24 | static void VPrint(const char* format, va_list args); |
25 | |
26 | static void PrintErr(const char* format, ...) PRINTF_ATTRIBUTE(1, 2) { |
27 | va_list args; |
28 | va_start(args, format); |
29 | VPrintErr(format, args); |
30 | va_end(args); |
31 | } |
32 | |
33 | static void VPrintErr(const char* format, va_list args); |
34 | |
35 | private: |
36 | DISALLOW_ALLOCATION(); |
37 | DISALLOW_IMPLICIT_CONSTRUCTORS(Syslog); |
38 | }; |
39 | |
40 | } // namespace dart |
41 | |
42 | #endif // RUNTIME_PLATFORM_SYSLOG_H_ |
43 | |