Skip to content

Conversation

@cwaldren-ld
Copy link
Contributor

@cwaldren-ld cwaldren-ld commented May 17, 2023

One thing of note is probably the custom logging backend. This is a struct with a couple of function pointers + user data void pointer.

I've provided a wrapper that converts that into an ILogBackend.

Aside from that, everything else is mostly straightforward.

@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #201468: Create C bindings for Config type.

@cwaldren-ld cwaldren-ld force-pushed the cw/sc-201468/config-bindings branch from d8a75eb to 2851d49 Compare May 17, 2023 01:34
.WithReasons(true)
.UseReport(true);
config_builder.Logging().Logging(
LoggingBuilder::BasicLogging().Level(LogLevel::kDebug));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could probably slightly improve this by adding Basic()/Custom() members to the logging builder, so it's not Logging().Logging. Hmm

#include <launchdarkly/bindings/c/status.h>

#include <stdio.h>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For size_t.

* severity.
* severity. The values must not be changed to ensure backwards compatibility
* with the C API.
*/
Copy link
Contributor Author

@cwaldren-ld cwaldren-ld May 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could use a switch instead of static_cast. It's just annoying.

@cwaldren-ld cwaldren-ld marked this pull request as ready for review May 17, 2023 01:48
@cwaldren-ld cwaldren-ld requested a review from kinyoklion May 17, 2023 01:49
std::map<std::string, std::string>{{"color", "green"}}));
builder.HttpProperties()
.ConnectTimeout(std::chrono::milliseconds{1234})
.ReadTimeout(std::chrono::milliseconds{123456})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WriteTimeout?

@cwaldren-ld cwaldren-ld merged commit 1b1e66a into main May 18, 2023
@cwaldren-ld cwaldren-ld deleted the cw/sc-201468/config-bindings branch May 18, 2023 19:09
@github-actions github-actions bot mentioned this pull request May 18, 2023
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

Successfully merging this pull request may close these issues.

3 participants