MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/cpp-samples / LogFormat

Function LogFormat

getting-started/gke/index_gcs.cc:149–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149std::string LogFormat(std::string const& sev, std::string const& msg) {
150 return nlohmann::json{{"severity", sev}, {"message", msg}}.dump();
151}
152
153void LogError(std::string const& msg) {
154 std::cerr << LogFormat("error", msg) << "\n";

Callers 1

LogErrorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected