Log.h
Go to the documentation of this file.
1 //
2 // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 //
7 #pragma once
8 
15 #include <cstdint>
16 #include <string>
17 
18 namespace td {
19 
26 class Log {
27  public:
38  static bool set_file_path(std::string file_path);
39 
48  static void set_max_file_size(std::int64_t max_file_size);
49 
64  static void set_verbosity_level(int new_verbosity_level);
65 
71  using FatalErrorCallbackPtr = void (*)(const char *error_message);
72 
83  static void set_fatal_error_callback(FatalErrorCallbackPtr callback);
84 };
85 
86 } // namespace td
static void set_fatal_error_callback(FatalErrorCallbackPtr callback)
static void set_verbosity_level(int new_verbosity_level)
static bool set_file_path(std::string file_path)
void(*)(const char *error_message) FatalErrorCallbackPtr
Definition: Log.h:71
static void set_max_file_size(std::int64_t max_file_size)
Definition: Log.h:26