Skip to content

Commit 3d4fc40

Browse files
committed
log: Clean up logs during start up
1 parent f615d9a commit 3d4fc40

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

app/source/log.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@
77
#include "utils.h"
88

99
namespace Log {
10+
static const char *logPath = "debug.log";
11+
1012
int Error(const char *format, ...) {
1113
SceUID log = 0;
14+
15+
// Clear debug logs on start up
16+
sceIoRemove(logPath);
1217

13-
if (R_SUCCEEDED(log = sceIoOpen("debug.log", PSP_O_WRONLY | PSP_O_CREAT | PSP_O_APPEND, 0777))) {
18+
if (R_SUCCEEDED(log = sceIoOpen(logPath, PSP_O_WRONLY | PSP_O_CREAT | PSP_O_APPEND, 0777))) {
1419
va_list list;
1520
char string[256] = {0};
1621

0 commit comments

Comments
 (0)