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

Use log4cplus(#1344) #1351

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Use log4cplus(#1344) #1351

wants to merge 3 commits into from

Conversation

KangLin
Copy link
Contributor

@KangLin KangLin commented Dec 18, 2023

log4cplus:

  • Pros:
    • Mature and stable logging system
    • It can be configured to be compatible with previous log output formats
    • Can output to syslog, log4 server etc.
  • Cons: Not a pure C library

If you want to stick with C, After this PR(log4cplus/log4cplus#607) is accepted by log4cplus, the .cpp will no longer appear in the source code.

@KangLin KangLin force-pushed the log4cplus branch 19 times, most recently from f37f39f to 2e6c64d Compare December 20, 2023 06:44
@KangLin
Copy link
Contributor Author

KangLin commented Dec 20, 2023

@eakraly @ggarber macOS CI seems to have a problem and helps fix it.
@jelmd @eakraly @ggarber @SamuelMarks Please review.

@SamuelMarks
Copy link
Contributor

syslog and friends are pretty easy to write to. If you want to stick to C, just came across this https://codeberg.org/RafaGago/mini-async-log-c

@KangLin
Copy link
Contributor Author

KangLin commented Dec 21, 2023

Thanks @SamuelMarks for recommending.

In O&M, the function of output to the log server is very important too.

Makefile.in Show resolved Hide resolved
docs/Log.md Show resolved Hide resolved
@jonesmz
Copy link
Contributor

jonesmz commented Jan 19, 2024

It would ideal if this PR could be adjusted to put the various logging actions behind macros that are generic enough to be implemented with different backends.

My $dayjob uses our own in-house logging system where we have a lot of tooling around the specific log file binary format that we produce. It would be very nice to see this changelist use macros for every place that log statements are called so that I could drop my own logging system into place without having to touch every file.

@KangLin
Copy link
Contributor Author

KangLin commented Jan 20, 2024 via email

@KangLin
Copy link
Contributor Author

KangLin commented Jan 20, 2024 via email

@KangLin
Copy link
Contributor Author

KangLin commented Jan 20, 2024 via email

@KangLin
Copy link
Contributor Author

KangLin commented Jan 20, 2024 via email

@jonesmz
Copy link
Contributor

jonesmz commented Jan 20, 2024 via email

@KangLin
Copy link
Contributor Author

KangLin commented Jan 22, 2024

You have changes in a single commit that aren't related to each other I was asking about it because it would be nice to have the commits broken up into more logical changes.

On Fri, Jan 19, 2024, 19:05 Kang Lin @.> wrote: Please see ci 在 2024-01-20 00:30:46,"Michael Jones" @.> 写道: @jonesmz commented on this pull request. In .github/workflows/tests.yml: > @@ -30,7 +30,8 @@ jobs: libpq-dev libsqlite3-dev \ libhiredis-dev \ libmongoc-dev \ - libmicrohttpd-dev + libmicrohttpd-dev \ + liblog4cplus-dev I don't see how this change, and the change to Dockerfile, have anything to do with the change to the run_tests.sh program? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.> — Reply to this email directly, view it on GitHub <#1351 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFYQR2Y6KD52Z7OUYKHVTDYPMJ4VAVCNFSM6AAAAABAZDBKJ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBRGUYTOMRYHE . You are receiving this because you were mentioned.Message ID: @.>

It is a single commit!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants