We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 53158f9 commit fbdc753Copy full SHA for fbdc753
1 file changed
src/bot/utils/apiRequestLogger.ts
@@ -44,6 +44,9 @@ class ApiRequestLogger {
44
response: { status: number; ok: boolean; body?: any; error?: string }
45
): void {
46
try {
47
+ if (!fs.existsSync(API_LOGS_DIR)) {
48
+ fs.mkdirSync(API_LOGS_DIR, { recursive: true });
49
+ }
50
const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
51
const userPart = userId ? userId.substring(0, 8) : 'system';
52
const filename = `${userPart}_${action}_${timestamp}.json`;
0 commit comments