fastly::log::Endpoint doesn't implement the <iostream> interfaces.

Open
#86 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
cpp
Domain
api

Research direction

Start with include/fastly/log.h at the Endpoint declaration and src/cpp/log.cpp at from_name(). Compare the documented iostream usage with the class interface and its expectedfastly::log::Endpoint return type. Done means Endpoint supports the intended output interface and the documentation matches the actual return value.

Written by the indexing model from the issue text.

Description

I've noticed that while the code comment for fastly::log::Endpoint says I should write to the endpoint using the <iostream> interfaces, the code for the class doesn't actually implement std::ostream.

So currently it seems there is no way to output to an Endpoint instantiated using fastly::log::Endpoint::from_name().

Note this class doesn't inherit from anything:
https://github.com/fastly/compute-sdk-cpp/blob/57984bce76d17622a44eea286500497e201f7f71/include/fastly/log.h#L417-L425

Additionally, the code comment above shows fastly::log::Endpoint::from_name() being used as though it returns an fastly::log::Endpoint instance directly, but the actual SDK returns expected<fastly::log::Endpoint>.

https://github.com/fastly/compute-sdk-cpp/blob/57984bce76d17622a44eea286500497e201f7f71/src/cpp/log.cpp#L19

Dominant language
C++
Stars
9
Forks
2
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fastly/compute-sdk-cpp

All issues in fastly/compute-sdk-cpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.