-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enum event_type seems to be wrong #167
Comments
Refer to the following issue for more details: boostorg#167
The page you link to describes severity levels, which is not the same as event type. Severity levels are described in the message file, and there Boost.Log does use values from 0 to 3. Severity levels are further associated with message templates, each template having an id. That id is supplied to |
Hi.. Thanks for the clarification. I need some help on #169 |
In the following header file:
https://github.com/boostorg/log/blob/master/include/boost/log/sinks/event_log_constants.hpp
The enum:
//! Windows event types
enum event_type
{
success = 0, //!< Equivalent to EVENTLOG_SUCCESS
info = 4, //!< Equivalent to EVENTLOG_INFORMATION_TYPE
warning = 2, //!< Equivalent to EVENTLOG_WARNING_TYPE
error = 1 //!< Equivalent to EVENTLOG_ERROR_TYPE
};
is not correct in my opinion.
According to latest Microsoft documentation, valid values for event_type are 0, 1, 2 and 3 only.
Please refer to the following link to verify my claim:
https://docs.microsoft.com/en-in/windows/win32/eventlog/message-text-files#:~:text=message%20definition%20section.-,SeverityNames%3D,-(name%3Dnumber%5B%3Aname
The correct enum should be like this:
//! Windows event types
enum event_type
{
success = 0, //!< Equivalent to EVENTLOG_SUCCESS
info = 1, //!< Equivalent to EVENTLOG_INFORMATION_TYPE
warning = 2, //!< Equivalent to EVENTLOG_WARNING_TYPE
error = 3 //!< Equivalent to EVENTLOG_ERROR_TYPE
};
The text was updated successfully, but these errors were encountered: