Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hcarrasc/logit4c
Records what you want from your C source code
https://github.com/hcarrasc/logit4c
c logging-library
Last synced: 11 days ago
JSON representation
Records what you want from your C source code
- Host: GitHub
- URL: https://github.com/hcarrasc/logit4c
- Owner: hcarrasc
- Created: 2016-02-02T14:58:28.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-08T12:01:37.000Z (almost 9 years ago)
- Last Synced: 2024-11-12T00:31:15.954Z (2 months ago)
- Topics: c, logging-library
- Language: C
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Logit4C
Records what you want from your C source code
## How to use?
Simple. Just import to you file:
`#import "logit.h"`And call to logit function:
```
char* data;
data = "Hello World :)";
logit(data, _F_, _L_);data = "Is an amazing day to coding :D";
logit(data, _F_, _L_);
```It create a log file and print inner as follow:
```
Wed Feb 03 16:49:52 2016 | main | 9 - Hello World :)
Wed Feb 03 16:49:52 2016 | main | 12 - Is an amazing day to coding :D
Wed Feb 03 16:49:52 2016 | main | 15 - And add a few new features :D
```Adding a timestamp, function name and code line where logit() function was called.
__Feel free to give pull request and improve this project.__
**NOTE:** `__LINE__` and `__FUNCTION__` directives doesnt works in Mac OSX El Capitan.