Chromium Code Reviews| Index: base/syslog_logging.h |
| diff --git a/base/syslog_logging.h b/base/syslog_logging.h |
| index 74f35beaf1aab86beb06d39e8d272c4a7c413ec5..74c6fd0062a92587307240c7cf27cdd4a744c8a9 100644 |
| --- a/base/syslog_logging.h |
| +++ b/base/syslog_logging.h |
| @@ -5,8 +5,14 @@ |
| #ifndef BASE_SYSLOG_LOGGING_H_ |
| #define BASE_SYSLOG_LOGGING_H_ |
| +#include <iosfwd> |
| + |
| #include "base/logging.h" |
| +#if defined(OS_WIN) |
|
grt (UTC plus 2)
2017/06/21 21:48:01
#include "build/build_config.h" for the definition
proberge
2017/06/22 14:35:47
Done.
|
| +#include <windows.h> |
| +#endif |
| + |
| namespace logging { |
| // Keep in mind that the syslog is always active regardless of the logging level |
| @@ -17,10 +23,14 @@ namespace logging { |
| #define SYSLOG(severity) \ |
| SYSLOG_STREAM(severity) |
| -// Sets the name of the event source for logging to the Windows Event Log. |
| -// Call this function once before using the SYSLOG macro or otherwise it will |
| -// behave as a regular LOG macro. |
| -void BASE_EXPORT SetEventSourceName(const std::string& name); |
| +#if defined(OS_WIN) |
| +// Sets the name, category and event id of the event source for logging to the |
| +// Windows Event Log. Call this function once before using the SYSLOG macro or |
| +// otherwise it will behave as a regular LOG macro. |
| +void BASE_EXPORT SetEventSource(const std::string& name, |
| + WORD category, |
| + DWORD event_id); |
| +#endif // defined(OS_WIN) |
| // Creates a formatted message on the system event log. That would be the |
| // Application Event log on Windows and the messages log file on POSIX systems. |