mirror of
https://gitee.com/zyjblog/oatpp.git
synced 2024-12-21 16:15:13 +08:00
changelog: update 1.4.0
This commit is contained in:
parent
19114d749f
commit
e0d9266faa
@ -12,6 +12,7 @@ Contents:
|
||||
- [oatpp::Tree](#oatpptree)
|
||||
- [Remapper](#remapper)
|
||||
- [oatpp::web::mime::ContentMappers](#oatppwebmimecontentmappers)
|
||||
- [New OATPP_LOGx format](#new-oatpp_logx-format)
|
||||
- [Restructuring](#restructuring)
|
||||
|
||||
|
||||
@ -149,6 +150,29 @@ on `Content-Type`/`Accept` headers.
|
||||
}
|
||||
```
|
||||
|
||||
## New OATPP_LOGx format
|
||||
|
||||
Now oatpp logs are type-safe. Also log formatting changed.
|
||||
|
||||
#### Macro
|
||||
|
||||
| old logs | new logs |
|
||||
|--------------|--------------|
|
||||
| `OATPP_LOGV` | `OATPP_LOGv` |
|
||||
| `OATPP_LOGD` | `OATPP_LOGd` |
|
||||
| `OATPP_LOGI` | `OATPP_LOGi` |
|
||||
| `OATPP_LOGW` | `OATPP_LOGw` |
|
||||
| `OATPP_LOGE` | `OATPP_LOGe` |
|
||||
|
||||
#### Formatting
|
||||
|
||||
Instead of old formatting "%s", "%d", "%f" use "{}" for any variable type:
|
||||
|
||||
```cpp
|
||||
OATPP_LOGd("MyController", "User: name={}, age={}", user->name, user->age)
|
||||
```
|
||||
|
||||
|
||||
## Restructuring
|
||||
|
||||
### Files
|
||||
|
Loading…
Reference in New Issue
Block a user