1*3f982cf4SFabien Sanglard // Copyright 2019 The Chromium Authors. All rights reserved. 2*3f982cf4SFabien Sanglard // Use of this source code is governed by a BSD-style license that can be 3*3f982cf4SFabien Sanglard // found in the LICENSE file. 4*3f982cf4SFabien Sanglard 5*3f982cf4SFabien Sanglard #ifndef PLATFORM_IMPL_LOGGING_H_ 6*3f982cf4SFabien Sanglard #define PLATFORM_IMPL_LOGGING_H_ 7*3f982cf4SFabien Sanglard 8*3f982cf4SFabien Sanglard #include "util/osp_logging.h" 9*3f982cf4SFabien Sanglard 10*3f982cf4SFabien Sanglard namespace openscreen { 11*3f982cf4SFabien Sanglard 12*3f982cf4SFabien Sanglard // Append logging output to a named FIFO having the given |filename|. If the 13*3f982cf4SFabien Sanglard // file does not exist, an attempt is made to auto-create it. If unsuccessful, 14*3f982cf4SFabien Sanglard // abort the program. If this is never called, logging continues to output to 15*3f982cf4SFabien Sanglard // the default destination (stderr). 16*3f982cf4SFabien Sanglard void SetLogFifoOrDie(const char* filename); 17*3f982cf4SFabien Sanglard 18*3f982cf4SFabien Sanglard // Set the global logging level. If this is never called, kWarning is the 19*3f982cf4SFabien Sanglard // default. 20*3f982cf4SFabien Sanglard void SetLogLevel(LogLevel level); 21*3f982cf4SFabien Sanglard 22*3f982cf4SFabien Sanglard // Returns the current global logging level. 23*3f982cf4SFabien Sanglard LogLevel GetLogLevel(); 24*3f982cf4SFabien Sanglard 25*3f982cf4SFabien Sanglard } // namespace openscreen 26*3f982cf4SFabien Sanglard 27*3f982cf4SFabien Sanglard #endif // PLATFORM_IMPL_LOGGING_H_ 28