]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/util/stderr_logger.h
1 // Copyright (c) 2016-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under the BSD-style license found in the
3 // LICENSE file in the root directory of this source tree. An additional grant
4 // of patent rights can be found in the PATENTS file in the same directory.
11 #include "rocksdb/env.h"
15 // Prints logs to stderr for faster debugging
16 class StderrLogger
: public Logger
{
18 explicit StderrLogger(const InfoLogLevel log_level
= InfoLogLevel::INFO_LEVEL
)
19 : Logger(log_level
) {}
21 // Brings overloaded Logv()s into scope so they're not hidden when we override
25 virtual void Logv(const char* format
, va_list ap
) override
{
26 vfprintf(stderr
, format
, ap
);
27 fprintf(stderr
, "\n");
31 } // namespace rocksdb