Yuri Wiitala | b797903 | 2019-11-08 15:17:20 -0800 | [diff] [blame] | 1 | // Copyright 2019 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_H_ |
| 6 | #define PLATFORM_IMPL_LOGGING_H_ |
| 7 | |
Jordan Bayles | a44d04a | 2020-05-06 16:59:39 -0700 | [diff] [blame] | 8 | #include "util/osp_logging.h" |
Yuri Wiitala | b797903 | 2019-11-08 15:17:20 -0800 | [diff] [blame] | 9 | |
| 10 | namespace openscreen { |
Yuri Wiitala | b797903 | 2019-11-08 15:17:20 -0800 | [diff] [blame] | 11 | |
mark a. foltz | d6a5a22 | 2020-07-28 17:28:06 -0700 | [diff] [blame^] | 12 | // Append logging output to a named FIFO having the given |filename|. If the |
Yuri Wiitala | b797903 | 2019-11-08 15:17:20 -0800 | [diff] [blame] | 13 | // file does not exist, an attempt is made to auto-create it. If unsuccessful, |
| 14 | // abort the program. If this is never called, logging continues to output to |
| 15 | // the default destination (stderr). |
| 16 | void SetLogFifoOrDie(const char* filename); |
| 17 | |
| 18 | // Set the global logging level. If this is never called, kWarning is the |
| 19 | // default. |
| 20 | void SetLogLevel(LogLevel level); |
| 21 | |
mark a. foltz | d6a5a22 | 2020-07-28 17:28:06 -0700 | [diff] [blame^] | 22 | // Returns the current global logging level. |
| 23 | LogLevel GetLogLevel(); |
| 24 | |
Yuri Wiitala | b797903 | 2019-11-08 15:17:20 -0800 | [diff] [blame] | 25 | } // namespace openscreen |
| 26 | |
| 27 | #endif // PLATFORM_IMPL_LOGGING_H_ |