Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async logger back thread should catch sink exceptions #1

Closed
gabime opened this issue Nov 3, 2014 · 1 comment
Closed

Async logger back thread should catch sink exceptions #1

gabime opened this issue Nov 3, 2014 · 1 comment
Assignees
Labels

Comments

@gabime
Copy link
Owner

gabime commented Nov 3, 2014

And possibly notify somehow to the calling thread about the exception

@gabime gabime added the bug label Nov 3, 2014
@gabime gabime self-assigned this Nov 3, 2014
@gabime
Copy link
Owner Author

gabime commented Nov 7, 2014

Fixed in commit 4bd25f8

@gabime gabime closed this as completed Nov 7, 2014
gabime pushed a commit that referenced this issue Dec 10, 2014
gabime pushed a commit that referenced this issue Jul 26, 2015
Add wchar_t support for Windows.
@sleger0507 sleger0507 mentioned this issue Feb 11, 2016
gabime pushed a commit that referenced this issue Oct 2, 2018
Fix return type in README file.
@zh1an zh1an mentioned this issue Nov 28, 2019
This was referenced Apr 9, 2020
lucasrangit added a commit to lucasrangit/spdlog that referenced this issue Jul 5, 2023
Android logger (since API 30) checks the per-tag property `log.tag.<tag>` to determine if a log message is loggable. See https://developer.android.com/ndk/reference/group/logging#__android_log_is_loggable . For example, `__android_log_buf_write` for a VERBOSE message will call `__android_log_is_loggable` and return `-EPERM` if the log message will not be printed because `log.tag.<tag>` is set to `INFO`.

Instead of erroring with the following error message, the Android sink should handle `-EPERM`. It is not an error to disable a log via the run-time property.

```
[*** LOG ERROR gabime#1 ***] [2023-06-29 00:50:26] [logcat] logging to Android failed: Unknown error -1 [/path/to/file.cpp(123)]
```
gabime pushed a commit that referenced this issue Jul 6, 2023
Android logger (since API 30) checks the per-tag property `log.tag.<tag>` to determine if a log message is loggable. See https://developer.android.com/ndk/reference/group/logging#__android_log_is_loggable . For example, `__android_log_buf_write` for a VERBOSE message will call `__android_log_is_loggable` and return `-EPERM` if the log message will not be printed because `log.tag.<tag>` is set to `INFO`.

Instead of erroring with the following error message, the Android sink should handle `-EPERM`. It is not an error to disable a log via the run-time property.

```
[*** LOG ERROR #1 ***] [2023-06-29 00:50:26] [logcat] logging to Android failed: Unknown error -1 [/path/to/file.cpp(123)]
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant