Loading...
Searching...
No Matches
logging.h
Go to the documentation of this file.
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
* Copyright (C) 2019, Google Inc.
*
* Logging infrastructure
*/
#pragma once
#include <ostream>
namespace libcamera {
enum LoggingTarget {
LoggingTargetNone,
LoggingTargetSyslog,
LoggingTargetFile,
LoggingTargetStream,
};
int logSetFile(const char *path, bool color = false);
int logSetStream(std::ostream *stream, bool color = false);
int logSetTarget(LoggingTarget target);
void logSetLevel(const char *category, const char *level);
} /* namespace libcamera */
libcamera
Top-level libcamera namespace.
Definition backtrace.h:17
libcamera::logSetStream
int logSetStream(std::ostream *stream, bool color=false)
Direct logging to a stream.
Definition log.cpp:392
libcamera::logSetLevel
void logSetLevel(const char *category, const char *level)
Set the log level.
Definition log.cpp:435
libcamera::logSetFile
int logSetFile(const char *path, bool color=false)
Direct logging to a file.
Definition log.cpp:369
libcamera::logSetTarget
int logSetTarget(LoggingTarget target)
Set the logging target.
Definition log.cpp:415
libcamera::LoggingTarget
LoggingTarget
Log destination type.
Definition logging.h:14
libcamera::LoggingTargetFile
@ LoggingTargetFile
Log to file.
Definition logging.h:17
libcamera::LoggingTargetNone
@ LoggingTargetNone
No logging destination.
Definition logging.h:15
libcamera::LoggingTargetSyslog
@ LoggingTargetSyslog
Log to syslog.
Definition logging.h:16
libcamera::LoggingTargetStream
@ LoggingTargetStream
Log to stream.
Definition logging.h:18