implemented logFlags-related stuff in logger-test
This commit is contained in:
parent
f04cfb8ad4
commit
799fc752b2
@ -27,8 +27,21 @@ int main(void)
|
|||||||
logFile logger = initLogger(WRITE_DIR); //INITIALIZE LOGGER FILE
|
logFile logger = initLogger(WRITE_DIR); //INITIALIZE LOGGER FILE
|
||||||
int bufferSize;
|
int bufferSize;
|
||||||
char *buffer;
|
char *buffer;
|
||||||
|
char *usedKey = malloc(getKeyLength() + 1);
|
||||||
FILE *fileBuffer;
|
FILE *fileBuffer;
|
||||||
|
|
||||||
|
//GENERATE KEY
|
||||||
|
generateKey(usedKey, getKeyLength());
|
||||||
|
|
||||||
|
//FLAGS
|
||||||
|
logFlags flags =
|
||||||
|
{
|
||||||
|
usedKey
|
||||||
|
};
|
||||||
|
|
||||||
|
//SET FLAGS
|
||||||
|
setLogFlags(flags);
|
||||||
|
|
||||||
writeLog(logger.file, WRITE_MESSAGE); //WRITE
|
writeLog(logger.file, WRITE_MESSAGE); //WRITE
|
||||||
|
|
||||||
fileBuffer = fopen(logger.fileName, "r");
|
fileBuffer = fopen(logger.fileName, "r");
|
||||||
@ -46,6 +59,7 @@ int main(void)
|
|||||||
|
|
||||||
//DEALLOCATION
|
//DEALLOCATION
|
||||||
free(buffer);
|
free(buffer);
|
||||||
|
free(usedKey);
|
||||||
fclose(fileBuffer);
|
fclose(fileBuffer);
|
||||||
deallocateLogger(logger);
|
deallocateLogger(logger);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user