Skip to content

Commit e856be1

Browse files
authored
Fix to support spdlog v1.y.z (#28)
* Fix general breaking file sinks breaking changes in spdlog v1.0.0 * Fix syslog test cases * Remove all third_party/fmt and use spdlog/fmt instead * Pin to latest spdlog v1.2.1 to indicate last working version * Fix v1.3.0 and v1.3.1 enum issue and pin v1.3.1 * Add more details to CHANGELOG * Make syslog include to be within non-Windows side only * Shift using keywords for syslog * Bump alpha version
1 parent d21ceba commit e856be1

File tree

23 files changed

+110
-6506
lines changed

23 files changed

+110
-6506
lines changed

CHANGELOG.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,23 @@
22

33
## Unreleased
44

5+
- Change support to `spdlog` `v1.y.z` tag release, currently tested all `v1.0.0`
6+
to `v1.3.1` to be working. This fixes
7+
([#26](https://github.com/guangie88/spdlog_setup/issues/26)).
8+
- `simple_file_sink_st` becomes `basic_file_sink_st`
9+
- `simple_file_sink_mt` becomes `basic_file_sink_mt`
10+
- `syslog_sink` splits into `syslog_sink_st` and `syslog_sink_mt`
11+
- Fix CMake package finding failure when installed using submodule `spdlog`
12+
([#23](https://github.com/guangie88/spdlog_setup/issues/23)).
13+
- Fix global pattern not used by subsequent loggers other than the first
14+
([#19](https://github.com/guangie88/spdlog_setup/issues/19)).
515
- Add functions that allow configuration overrides:
616
- `from_file_and_override`
717
- `from_file_and_override_with_tag_replacement`
818
- `save_logger_to_file`
919
- `delete_logger_in_file`
10-
- Fix CMake package finding failure when installed using submodule `spdlog`
11-
([#23](https://github.com/guangie88/spdlog_setup/issues/23))
12-
- Fix global pattern not used by subsequent loggers other than the first
13-
([#19](https://github.com/guangie88/spdlog_setup/issues/19)).
1420

15-
## v0.2
21+
## v0.2 (Tested to support `v0.16.z` to `v0.17.0`)
1622

1723
- Use `spdlog_setup/conf.h` instead of `spdlog_setup.h`. Reason for change is
1824
to allow inlining of `cpptoml` and `fmt` libraries.

README.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ The header files should be installed in `build/install/include`.
148148
- `stdout_sink_mt`
149149
- `color_stdout_sink_st`
150150
- `color_stdout_sink_mt`
151-
- `simple_file_sink_st`
152-
- `simple_file_sink_mt`
151+
- `basic_file_sink_st`
152+
- `basic_file_sink_mt`
153153
- `rotating_file_sink_st`
154154
- `rotating_file_sink_mt`
155155
- `daily_file_sink_st`
@@ -204,7 +204,7 @@ type = "color_stdout_sink_mt"
204204

205205
[[sink]]
206206
name = "file_out"
207-
type = "simple_file_sink_st"
207+
type = "basic_file_sink_st"
208208
filename = "log/spdlog_setup.log"
209209
# truncate field is optional
210210
# truncate = false (default)
@@ -214,7 +214,7 @@ create_parent_dir = true
214214

215215
[[sink]]
216216
name = "file_err"
217-
type = "simple_file_sink_mt"
217+
type = "basic_file_sink_mt"
218218
filename = "log/spdlog_setup_err.log"
219219
truncate = true
220220
level = "err"
@@ -262,8 +262,17 @@ type = "null_sink_mt"
262262

263263
# only works for Linux
264264
[[sink]]
265-
name = "syslog"
266-
type = "syslog_sink"
265+
name = "syslog_st"
266+
type = "syslog_sink_st"
267+
# generally no need to fill up the optional fields below
268+
# ident = "" (default)
269+
# syslog_option = 0 (default)
270+
# syslog_facility = LOG_USER (default macro value)
271+
272+
# only works for Linux
273+
[[sink]]
274+
name = "syslog_mt"
275+
type = "syslog_sink_mt"
267276
# generally no need to fill up the optional fields below
268277
# ident = "" (default)
269278
# syslog_option = 0 (default)
@@ -282,7 +291,7 @@ sinks = [
282291
"file_out", "file_err",
283292
"rotate_out", "rotate_err",
284293
"null_sink_st", "null_sink_mt",
285-
"syslog"]
294+
"syslog_st", "syslog_mt"]
286295
level = "trace"
287296

288297
[[logger]]
@@ -320,7 +329,7 @@ create_parent_dir = true
320329

321330
[[sink]]
322331
name = "simple_err"
323-
type = "simple_file_sink_mt"
332+
type = "basic_file_sink_mt"
324333
filename = "log/{index}-err/simple-{path}.log"
325334
truncate = false
326335
level = "err"

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 0.3.0-alpha.1.{build}
1+
version: 0.3.0-alpha.2.{build}
22

33
image:
44
- Visual Studio 2015

config/log_conf.pre.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ create_parent_dir = true
2626

2727
[[sink]]
2828
name = "simple_err"
29-
type = "simple_file_sink_mt"
29+
type = "basic_file_sink_mt"
3030
filename = "log/{index}-err/simple-{path}.log"
3131
truncate = false
3232
level = "err"

config/log_conf_linux.toml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type = "color_stdout_sink_mt"
3131

3232
[[sink]]
3333
name = "file_out"
34-
type = "simple_file_sink_st"
34+
type = "basic_file_sink_st"
3535
filename = "log/spdlog_setup.log"
3636
# truncate field is optional
3737
# truncate = false (default)
@@ -41,7 +41,7 @@ create_parent_dir = true
4141

4242
[[sink]]
4343
name = "file_err"
44-
type = "simple_file_sink_mt"
44+
type = "basic_file_sink_mt"
4545
filename = "log/spdlog_setup_err.log"
4646
truncate = true
4747
level = "err"
@@ -89,8 +89,17 @@ type = "null_sink_mt"
8989

9090
# only works for Linux
9191
[[sink]]
92-
name = "syslog"
93-
type = "syslog_sink"
92+
name = "syslog_st"
93+
type = "syslog_sink_st"
94+
# generally no need to fill up the optional fields below
95+
# ident = "" (default)
96+
# syslog_option = 0 (default)
97+
# syslog_facility = LOG_USER (default macro value)
98+
99+
# only works for Linux
100+
[[sink]]
101+
name = "syslog_mt"
102+
type = "syslog_sink_mt"
94103
# generally no need to fill up the optional fields below
95104
# ident = "" (default)
96105
# syslog_option = 0 (default)
@@ -109,7 +118,7 @@ sinks = [
109118
"file_out", "file_err",
110119
"rotate_out", "rotate_err",
111120
"null_sink_st", "null_sink_mt",
112-
"syslog"]
121+
"syslog_st"]
113122
level = "trace"
114123

115124
[[logger]]

config/log_conf_win.toml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type = "color_stdout_sink_mt"
3131

3232
[[sink]]
3333
name = "file_out"
34-
type = "simple_file_sink_st"
34+
type = "basic_file_sink_st"
3535
filename = "log/spdlog_setup.log"
3636
# truncate field is optional
3737
# truncate = false (default)
@@ -41,7 +41,7 @@ create_parent_dir = true
4141

4242
[[sink]]
4343
name = "file_err"
44-
type = "simple_file_sink_mt"
44+
type = "basic_file_sink_mt"
4545
filename = "log/spdlog_setup_err.log"
4646
truncate = true
4747
level = "err"
@@ -87,15 +87,6 @@ type = "null_sink_st"
8787
name = "null_sink_mt"
8888
type = "null_sink_mt"
8989

90-
# only works for Linux
91-
# [[sink]]
92-
# name = "syslog"
93-
# type = "syslog_sink"
94-
# generally no need to fill up the optional fields below
95-
# ident = "" (default)
96-
# syslog_option = 0 (default)
97-
# syslog_facility = LOG_USER (default macro value)
98-
9990
[[pattern]]
10091
name = "succient"
10192
value = "%c-%L: %v"

deps/spdlog

Submodule spdlog updated 135 files

include/spdlog_setup/conf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Implementation of public facing functions in spdlog_setup.
33
* @author Chen Weiguang
4-
* @version 0.3.0-alpha.1
4+
* @version 0.3.0-alpha.2
55
*/
66

77
#pragma once

0 commit comments

Comments
 (0)