Skip to content
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

basic_event_log_backend constructor requires keywords::message_file #8

Closed
GregDomjan opened this issue Jul 16, 2015 · 1 comment
Closed

Comments

@GregDomjan
Copy link

A bit of a nuisance as I'm not familiar enough with these argument list constructors.

MSVC reports
sinks/event_log_backend.hpp(628): error C2679: binary '[' : no operator found which takes a right-hand operand of type 'const boost::parameter::keyword<boost::log::v2s_mt_nt5::keywords::tag::message_file>' (or there is no acceptable conversion)

https://github.com/boostorg/log/blob/master/include/boost/log/sinks/event_log_backend.hpp#L625-633

Even when keywords::registration = sinks::event_log::never and keywords::message_file and keywords::log_name are unused, keywords::message_file must be provided - perhaps as there is no default for it?

// Create an event log sink
boost::shared_ptr< sinks::wevent_log_backend > backend(
    new sinks::wevent_log_backend((
    keywords::message_file = L"",// "%SystemDir%\\event_log_messages.dll",  not initialising registry, don't need to provide the message dll name - if this isn't provided there is a compiler error here in MSVC
    //keywords::log_name = L"",// "Application",  not initializing registry, don't need to provide the named log 
    keywords::log_source = L"My Source",
    keywords::registration = sinks::event_log::never
    ))
    );
@Lastique
Copy link
Member

Changed in cb68c02. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants