chromium/components/policy/core/common/policy_logger.h

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_POLICY_CORE_COMMON_POLICY_LOGGER_H_
#define COMPONENTS_POLICY_CORE_COMMON_POLICY_LOGGER_H_

#include <deque>
#include <sstream>
#include <string>
#include <string_view>

#include "base/logging.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "base/values.h"
#include "components/policy/policy_export.h"

// Note: the DLOG_POLICY macro has no "#if DCHECK_IS_ON()" check because some
// messages logged with DLOG are still important to be seen on the
// chrome://policy/logs page in release mode. The DLOG call in StreamLog() will
// do the check as usual for command line logging.
#define LOG_POLICY(log_severity, log_source)
#define DLOG_POLICY(log_severity, log_source)
#define VLOG_POLICY(log_verbosity, log_source)
#define DVLOG_POLICY(log_verbosity, log_source)
#define LOG_POLICY_INFO(log_type, log_source)
#define LOG_POLICY_WARNING(log_type, log_source)
#define LOG_POLICY_ERROR(log_type, log_source)

#define POLICY_AUTH
#define POLICY_PROCESSING
#define CBCM_ENROLLMENT
#define POLICY_FETCHING
#define PLATFORM_POLICY
#define REMOTE_COMMANDS
#define DEVICE_TRUST
#define OIDC_ENROLLMENT
#define EXTENSIBLE_SSO

namespace policy {

// Collects logs to be displayed in chrome://policy-logs.
class POLICY_EXPORT PolicyLogger {};

}  // namespace policy

#endif  // COMPONENTS_POLICY_CORE_COMMON_POLICY_LOGGER_H_