blob: fe03ac4a3901815635519190fd579692ce46c4d6 [file] [log] [blame]
mark a. foltzd6a5a222020-07-28 17:28:06 -07001// Copyright 2020 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef PLATFORM_IMPL_LOGGING_TEST_H_
6#define PLATFORM_IMPL_LOGGING_TEST_H_
7
8#include <string>
9#include <vector>
10
11// These functions should only be called from logging unittests.
12
13namespace openscreen {
14
15// Append logging output to |messages|. Each log entry will be written as a new
16// element including a newline. Pass nullptr to stop appending output. Calling
17// this does not affect the behavior of SetLogFifoOrDie(). Normally this should
18// only be called for tests as it creates an append-only buffer of log messages
19// in memory.
20void SetLogBufferForTest(std::vector<std::string>* messages);
21
mark a. foltzd6a5a222020-07-28 17:28:06 -070022} // namespace openscreen
23
24#endif // PLATFORM_IMPL_LOGGING_TEST_H_