"Smooll" LOgging Utility (pronounced slew
).
slou
is a simple logging library made in C++ that's easy to use and can be used in both small and big projects.
slou uses the Meson build system which means that you can install your project on all platforms that are supported by Meson.
Linux users can download a binary of the library on the Releases page. Windows users can now also download a binary of the library on the Releases page.
- Meson
- git
- Doxygen (optional, if you want to help with documentation, install it)
Building slou is as easy as 1-2-3. The following commands are directed at Linux users but it should work for any operating system as Meson will generate the necessary files for building the project.
$ git clone --recursive https://github.com/reallySmooll/slou.git
$ cd slou/
$ meson setup build/
$ meson compile -C build/
If you're on Linux and want to install the library system-wide, you can use these commands (after cloning the repository and entering into the directory):
$ meson setup --prefix /usr build/
$ sudo meson install -C build
slou was designed to be very easy to use. And as it is a small library it doesn't require anymore setup than this:
#include <slou/slou.hpp>
int main()
{
slou::Logger logger;
logger.Log(logger.INFO, "Hello, world!");
return 0;
}
That is the default setup for slou. The logs will be saved to a file called (by default) slou.log
but the logs will not be displayed on the screen.
You can obviously change this and customize it to your liking. If you'd like to see more, you can check out the documentation here or USAGE.md.
NOTE: There are problems with images on the Usage and configuration
section on the documentation page for slou, we are fixing them but until this note disappears, please use the USAGE.md if you want to see proof that the configuration works. Sorry for the inconvenience. :)
If you'd like to contribute, please refer to the contributing guide.
Here are some contributions:
- Testing on Windows - Marcel Zdziechowicz (@marcel-zdziechowicz)
If you'd like to see it, check out the CODE_OF_CONDUCT.md.