test and update the printf functionality

Signed-off-by: Ava Hahn <ava@aidanis.online>
This commit is contained in:
Ava Hahn 2022-08-11 11:15:42 -07:00
parent eeaa710f68
commit 56f87419f1
No known key found for this signature in database
GPG key ID: 18D8AD0591CA303E
3 changed files with 35 additions and 17 deletions

5
alog.h
View file

@ -78,8 +78,9 @@ void alog_add_target(int, char);
/* removes an fd from both out fds and err fds */
void alog_remove_target(int);
/* call to log a message. Takes a severity, a message, and format stuff */
void alog(alog_sev, const char *, ...);
/* call to log a message. Takes a severity, a message, and format stuff
* returns number of bytes written*/
int alog(alog_sev, const char *, ...);
/* overrides all calls to printf with a call to alog */
#ifdef ALOG_HIJACK_PRINTF