blob: 64b0bd225798d980f6580e1d09b252a73f7ee7fb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "log_protocol_proto.h"
#include <vespa/log/log_message.h>
#include <vector>
namespace logdemon {
/**
* Contains functions to convert log messages to protobuf objects.
*/
struct ProtoConverter {
using ProtoLogRequest = logserver::protocol::protobuf::LogRequest;
using ProtoLogResponse = logserver::protocol::protobuf::LogResponse;
using ProtoLogMessage = logserver::protocol::protobuf::LogMessage;
static void log_messages_to_proto(const std::vector<ns_log::LogMessage>& messages, ProtoLogRequest& proto);
static void log_message_to_proto(const ns_log::LogMessage& message, ProtoLogMessage& proto);
};
}
|