1 // 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 
13 namespace 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.
20 void SetLogBufferForTest(std::vector<std::string>* messages);
21 
22 }  // namespace openscreen
23 
24 #endif  // PLATFORM_IMPL_LOGGING_TEST_H_
25