mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-26 09:36:21 +00:00
feat(xmpp): add comprehensive connection debug logging
Add detailed debug output tracking connection lifecycle, autoping events, and session state transitions with timestamps and counters. - Track connection attempts, successes, disconnects, and reconnects - Log autoping timer events, responses, and timeouts - Record session login, logout, and reconnection attempts - Add elapsed time calculations since key events - Use [CONNDBG] tag for easy log filtering Files: connection.c, iq.c, session.c, connection.h
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
#define XMPP_CONNECTION_H
|
||||
|
||||
#include "xmpp/xmpp.h"
|
||||
#include <time.h>
|
||||
|
||||
#define CON_RAND_ID_LEN 15
|
||||
|
||||
@@ -68,4 +69,13 @@ void connection_remove_available_resource(const char* const resource);
|
||||
|
||||
char* connection_create_stanza_id(void);
|
||||
|
||||
// Extended debug accessors
|
||||
time_t connection_last_successful_connect_ts(void);
|
||||
time_t connection_last_disconnect_ts(void);
|
||||
unsigned long connection_connect_attempts(void);
|
||||
unsigned long connection_successful_connects(void);
|
||||
unsigned long connection_reconnect_counter(void);
|
||||
|
||||
char* _connection_format_elapsed_time(time_t base, time_t now, char* buf, size_t len);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user