Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ellectroid/flogger
File logger - minimalist log file utility
https://github.com/ellectroid/flogger
Last synced: about 22 hours ago
JSON representation
File logger - minimalist log file utility
- Host: GitHub
- URL: https://github.com/ellectroid/flogger
- Owner: ellectroid
- License: unlicense
- Created: 2024-01-24T13:56:11.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-01-24T14:23:12.000Z (10 months ago)
- Last Synced: 2024-01-24T15:35:15.572Z (10 months ago)
- Language: C++
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flogger
File logger - minimalist log file utilityThe purpose of this mini-library is to allow easy logging with minimal setup and configuration. Config & forget.
It's not intended to be the best/most feature rich/most efficient. It's intended to be easy to use. Due to its simplicity, it's also easily modifyable.Useful properties:
- One trivially destructible object works with 1 log file (but configurable/reconfigurable at runtime, so it's possible to use more files if you really want)
- Writes const char*[] and char*[] strings, input strings can be null terminated or with explicit length
- Returns integers with error codes, so error events can be handled (e.g. log file full, or out of memory for string formatting)
- Basic log file size limiter (optional, by file byte length or by number of lines in the log file)
- Autoformats input strings (prepends data and time tags - configurable, appends new line characters - configurable, you can set your own new line characters)
- Autoformatting memory buffer is provided by the user, use as much (little) memory as you see necessary# Example:
main.cpp:
...
server_log.log("This is a test entry");
...
log.txt:
[dd.mm.yyyy hh:mm:ss] This is a test entry[new line character(s) here]
License: Unlicense. It's just some code. I don't care what you do with it.