Skip to content

Commit 0906d75

Browse files
committed
Add _t suffix to class logger
1 parent 3a12fb3 commit 0906d75

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

src/gen/osm2pgsql-gen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ void run_tile_gen(std::atomic_flag *error_flag,
224224
std::mutex *mut, unsigned int n)
225225
{
226226
try {
227-
logger::init_thread(n);
227+
logger_t::init_thread(n);
228228

229229
log_debug("Started generalizer thread for '{}'.",
230230
master_generalizer->strategy());

src/logging.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,16 @@ namespace {
1616
thread_local unsigned int this_thread_num = 0;
1717

1818
/// Global logger singleton
19-
logger the_logger{};
19+
logger_t the_logger{};
2020

2121
} // anonymous namespace
2222

2323
/// Access the global logger singleton
24-
logger &get_logger() noexcept { return the_logger; }
24+
logger_t &get_logger() noexcept { return the_logger; }
2525

26-
void logger::generate_common_prefix(std::string *str, fmt::text_style const &ts,
27-
char const *prefix) const
26+
void logger_t::generate_common_prefix(std::string *str,
27+
fmt::text_style const &ts,
28+
char const *prefix) const
2829
{
2930
*str += fmt::format("{:%Y-%m-%d %H:%M:%S} ",
3031
fmt::localtime(std::time(nullptr)));
@@ -38,7 +39,7 @@ void logger::generate_common_prefix(std::string *str, fmt::text_style const &ts,
3839
}
3940
}
4041

41-
void logger::init_thread(unsigned int num)
42+
void logger_t::init_thread(unsigned int num)
4243
{
4344
// Store thread number in thread local variable
4445
this_thread_num = num;

src/logging.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ enum class log_level : uint8_t
3434
* This class contains the logging state and code. It is intended as a
3535
* singleton class. Its use is mostly wrapped in the log_*() free functions.
3636
*/
37-
class logger
37+
class logger_t
3838
{
3939
public:
4040
template <typename... TArgs>
@@ -107,9 +107,9 @@ class logger
107107
bool m_use_color = osmium::util::isatty(2);
108108
#endif
109109

110-
}; // class logger
110+
}; // class logger_t
111111

112-
logger &get_logger() noexcept;
112+
logger_t &get_logger() noexcept;
113113

114114
template <typename... TArgs>
115115
void log_debug(fmt::format_string<TArgs...> format_str, TArgs &&...args)

src/thread-pool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void thread_pool_t::shutdown_all_workers()
5050

5151
void thread_pool_t::worker_thread(unsigned int thread_num)
5252
{
53-
logger::init_thread(thread_num + 1);
53+
logger_t::init_thread(thread_num + 1);
5454

5555
while (true) {
5656
osmium::thread::function_wrapper task;

0 commit comments

Comments
 (0)