blob: 8424019c9caf22c7ecea8fa31daf427260fafc5c [file] [log] [blame]
Yuri Wiitalab7979032019-11-08 15:17:20 -08001// 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 Baylesa44d04a2020-05-06 16:59:39 -07008#include "util/osp_logging.h"
Yuri Wiitalab7979032019-11-08 15:17:20 -08009
10namespace openscreen {
Yuri Wiitalab7979032019-11-08 15:17:20 -080011
mark a. foltzd6a5a222020-07-28 17:28:06 -070012// Append logging output to a named FIFO having the given |filename|. If the
Yuri Wiitalab7979032019-11-08 15:17:20 -080013// 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).
16void SetLogFifoOrDie(const char* filename);
17
18// Set the global logging level. If this is never called, kWarning is the
19// default.
20void SetLogLevel(LogLevel level);
21
mark a. foltzd6a5a222020-07-28 17:28:06 -070022// Returns the current global logging level.
23LogLevel GetLogLevel();
24
Yuri Wiitalab7979032019-11-08 15:17:20 -080025} // namespace openscreen
26
27#endif // PLATFORM_IMPL_LOGGING_H_