emilk / loguru

A lightweight C++ logging library
The Unlicense
1.76k stars 255 forks source link

Porting for a pure C implementation #236

Open Dinesh-Ramakrishnan opened 1 year ago

Dinesh-Ramakrishnan commented 1 year ago

Hi @emilk ,

Thank you for this wonderful and super useful library. I have a pure C application in which I would like to use this logging library. Do we have any C language port available for this library?

If not, please provide me some guidelines, I am interested to port this to pure C library.

BullyWiiPlaza commented 12 months ago

I don't think so, man. This is a C++ library. You cannot simply provide a C implementation without rewriting it almost entirely. C++ streams won't be possible and so on. You're better off finding another logging library specifically for C.

virtuosonic commented 3 months ago

Rewritting any mature software will always result in an inmature and maybe buggy software. Making a wrapper would be complicated because of macros usage, some features depend on C++ RAII. Have you tried compiling your C application with a C++ compiler, maybe that is less work