MengRao / fmtlog

fmtlog is a performant fmtlib-style logging library with latency in nanoseconds.
MIT License
807 stars 124 forks source link

Installation of header files #2

Closed randomizedthinking closed 3 years ago

randomizedthinking commented 3 years ago

The header files are not set to be installed by the cmake. It is a minor issue... but I feel it would be good to install header files in the system so users do not need to copy these files in their project directory manually.

randomizedthinking commented 3 years ago

A few additional comments:

How do you think?

MengRao commented 3 years ago

Your comments make sense. Actually fmtlog is a pretty small project and I didn't take much time on cmake/installing scripting, the recommended building command is just running "./build.sh" which install libraries in the generated .build dir, and user can copy whatever he need to his destination path including header/library files(only two files need to be copied, 1 header + 1 lib or 2 headers, the lib file can be simply be renamed to remove "shared/static" part if you wish), it should not be hard to operate.

randomizedthinking commented 3 years ago

Agree that it is easy item.

Here I'd like to use the thread to ask one more question. After reading the document, my understanding is that fmtlog lacks the support for multiple log files. Yet, in my use cases, multiple files are common scenarios. Is there any way we can bypass this issue?

MengRao commented 3 years ago

what do you mean by multiple files? Like Daily files in spdlog? or different files for different threads or something else?

randomizedthinking commented 3 years ago

I mean, in the program, the user can open multiple loggers and send output to multiple files.

MengRao commented 3 years ago

It's hard to acheive, because fmtlog makes heavy use of static and thread local variables, so there can only be one log instance in the program.

randomizedthinking commented 3 years ago

I see. Yet it is an important feature. Thanks for the wonderful package.