Vasil Dimov
d3b3af9034
log: deduplicate category names and improve logging.cpp
...
The code in `logging.cpp` needs to:
* Get the category name given the flag (e.g. `BCLog::PRUNE` -> `"prune"`)
* Get the flag given the category name (e.g. `"prune"` -> `BCLog::PRUNE`)
* Get the list of category names sorted in alphabetical order
Achieve this by using the proper std containers. The result is
* less code (this diff is +62 / -129)
* faster code (to linear search and no copy+sort)
* more maintainable code (the categories are no longer duplicated in
`LogCategories[]` and `LogCategoryToStr()`)
This behavior is preserved:
`BCLog::NONE` -> `""` (lookup by `LogCategoryToStr()`)
`""` -> `BCLog::ALL` (lookup by `GetLogCategory("")`)
2024-02-11 15:14:12 +01:00
..
2024-01-02 11:12:32 -05:00
2024-01-23 21:01:32 -03:00
2023-11-16 11:36:22 +10:00
2024-01-26 18:56:41 -05:00
2023-12-04 15:39:15 -04:00
2024-01-11 11:01:28 -06:00
2024-01-05 10:42:10 +00:00
2023-11-28 12:35:50 -05:00
2024-02-05 14:21:10 +00:00
2024-02-01 13:52:05 +01:00
2024-02-09 23:37:57 -05:00
2023-11-28 08:44:41 -05:00
2024-02-08 15:59:53 +00:00
2024-02-09 23:37:57 -05:00
2023-12-08 06:54:00 -03:00
2024-01-04 14:40:28 +00:00
2023-11-19 18:43:29 +01:00
2024-02-09 23:37:57 -05:00
2024-01-05 11:22:31 +01:00
2024-02-09 16:38:13 -05:00
2023-12-11 18:22:13 +01:00
2023-12-15 15:20:54 +01:00
2024-02-08 13:49:15 -05:00
2024-01-15 16:19:53 -05:00
2023-11-21 17:37:25 +01:00
2023-11-21 17:37:25 +01:00
2024-01-05 17:16:38 +00:00
2024-01-09 15:27:08 -06:00
2023-12-11 13:08:46 -05:00
2023-11-16 11:36:22 +10:00
2023-12-04 15:39:15 -04:00
2023-11-16 11:14:13 +10:00
2023-11-14 08:45:30 +10:00
2023-11-28 12:42:07 +01:00
2024-02-01 13:52:05 +01:00
2023-11-21 13:15:44 +00:00
2023-11-24 14:41:58 +00:00
2023-12-11 18:22:13 +01:00
2023-11-16 11:36:22 +10:00
2023-12-11 18:22:13 +01:00
2023-11-30 11:28:19 +01:00
2024-01-05 17:12:38 +01:00
2023-11-16 11:36:22 +10:00
2024-02-01 13:52:05 +01:00
2024-01-10 14:11:32 -05:00
2023-12-04 15:39:15 -04:00
2024-01-07 16:24:08 -06:00
2024-01-31 15:58:47 -05:00
2023-12-04 15:39:15 -04:00
2024-01-16 15:29:18 +01:00
2024-01-16 15:29:18 +01:00
2024-01-16 15:29:18 +01:00
2024-02-11 15:14:12 +01:00
2023-12-20 15:59:48 +10:00
2024-02-09 23:37:57 -05:00
2024-01-02 11:12:32 -05:00
2024-02-07 09:23:42 +00:00
2023-11-20 15:57:50 -03:00
2024-02-03 17:59:43 +01:00
2023-11-28 17:49:41 +01:00
2023-11-28 17:49:41 +01:00
2024-02-01 13:52:05 +01:00
2024-01-15 10:28:20 -03:00
2024-01-31 11:44:41 -05:00
2024-01-31 15:33:57 -05:00
2024-01-23 11:49:32 +01:00
2023-11-07 14:11:58 -05:00
2023-11-07 14:11:58 -05:00
2023-12-06 11:22:42 -05:00
2023-12-02 22:03:08 +01:00
2023-11-20 14:02:27 +01:00
2024-01-18 19:29:34 +01:00
2024-01-23 10:25:16 -03:00
2024-01-23 10:25:16 -03:00
2023-11-30 11:28:19 +01:00
2023-11-28 12:42:07 +01:00
2024-01-16 10:58:57 +01:00
2023-11-07 15:00:38 -05:00
2024-01-05 10:42:10 +00:00
2023-12-22 09:58:18 +01:00
2023-11-28 12:42:07 +01:00
2023-12-22 09:58:19 +01:00
2023-11-30 11:27:54 +01:00
2024-01-05 17:16:38 +00:00
2024-02-01 13:52:05 +01:00
2024-01-10 14:11:32 -05:00
2024-02-09 23:37:57 -05:00
2024-02-09 23:37:57 -05:00
2023-12-08 13:14:46 +00:00
2023-12-08 13:14:46 +00:00
2023-12-07 11:06:01 +01:00
2023-11-16 11:36:22 +10:00
2024-02-09 23:37:57 -05:00
2024-01-05 17:16:38 +00:00
2023-11-22 11:48:21 +01:00
2024-01-02 12:40:11 +01:00