logging works ( but it's buggy 😭 )

This commit is contained in:
FantasyPvP
2024-12-05 01:42:50 +00:00
parent ad8496ca68
commit 3f35a00526
12 changed files with 786 additions and 44 deletions
+3 -2
View File
@@ -211,7 +211,7 @@ int main(int argc, char* argv[]) {
if (argc == 3) {
switch (cmd) {
case CMD_OPEN:
sprintf(log_fmt_string, "Edited File [%s]", argv[2]);
sprintf(log_fmt_string, "Opened File [%s]", argv[2]);
open_editor(argv[2]);
break;
case CMD_RM:
@@ -263,7 +263,8 @@ int main(int argc, char* argv[]) {
// log output of command
if (log_fmt_string[0] != '\0') {
String_t str = str_from_chars(log_fmt_string);
write_log(&str, 1);
write_log(&str);
str_dealloc(&str);
}
return 0;