logging works ( but it's buggy 😭 )
This commit is contained in:
+3
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user