|
@@ -72,41 +72,47 @@ UA_Session_getUniqueSubscriptionID(UA_Session *session);
|
|
/**
|
|
/**
|
|
* Log Helper
|
|
* Log Helper
|
|
* ---------- */
|
|
* ---------- */
|
|
|
|
+
|
|
#define UA_LOG_TRACE_SESSION(LOGGER, SESSION, MSG, ...) \
|
|
#define UA_LOG_TRACE_SESSION(LOGGER, SESSION, MSG, ...) \
|
|
- UA_LOG_TRACE(LOGGER, UA_LOGCATEGORY_SESSION, "Connection %i | SecureChannel %i | Session %i | " MSG, \
|
|
|
|
|
|
+ UA_LOG_TRACE(LOGGER, UA_LOGCATEGORY_SESSION, "Connection %i | SecureChannel %i | Session " PRINTF_GUID_FORMAT " | " MSG, \
|
|
(SESSION->channel ? (SESSION->channel->connection ? SESSION->channel->connection->sockfd : 0) : 0), \
|
|
(SESSION->channel ? (SESSION->channel->connection ? SESSION->channel->connection->sockfd : 0) : 0), \
|
|
(SESSION->channel ? SESSION->channel->securityToken.channelId : 0), \
|
|
(SESSION->channel ? SESSION->channel->securityToken.channelId : 0), \
|
|
- SESSION->sessionId.identifier.numeric, ##__VA_ARGS__);
|
|
|
|
|
|
+ PRINTF_GUID_DATA(SESSION->sessionId), \
|
|
|
|
+ ##__VA_ARGS__);
|
|
|
|
|
|
#define UA_LOG_DEBUG_SESSION(LOGGER, SESSION, MSG, ...) \
|
|
#define UA_LOG_DEBUG_SESSION(LOGGER, SESSION, MSG, ...) \
|
|
- UA_LOG_DEBUG(LOGGER, UA_LOGCATEGORY_SESSION, "Connection %i | SecureChannel %i | Session %i | " MSG, \
|
|
|
|
|
|
+ UA_LOG_DEBUG(LOGGER, UA_LOGCATEGORY_SESSION, "Connection %i | SecureChannel %i | Session " PRINTF_GUID_FORMAT " | " MSG, \
|
|
(SESSION->channel ? (SESSION->channel->connection ? SESSION->channel->connection->sockfd : 0) : 0), \
|
|
(SESSION->channel ? (SESSION->channel->connection ? SESSION->channel->connection->sockfd : 0) : 0), \
|
|
(SESSION->channel ? SESSION->channel->securityToken.channelId : 0), \
|
|
(SESSION->channel ? SESSION->channel->securityToken.channelId : 0), \
|
|
- SESSION->sessionId.identifier.numeric, ##__VA_ARGS__);
|
|
|
|
|
|
+ PRINTF_GUID_DATA(SESSION->sessionId), \
|
|
|
|
+ ##__VA_ARGS__);
|
|
|
|
|
|
#define UA_LOG_INFO_SESSION(LOGGER, SESSION, MSG, ...) \
|
|
#define UA_LOG_INFO_SESSION(LOGGER, SESSION, MSG, ...) \
|
|
- UA_LOG_INFO(LOGGER, UA_LOGCATEGORY_SESSION, "Connection %i | SecureChannel %i | Session %i | " MSG, \
|
|
|
|
|
|
+ UA_LOG_INFO(LOGGER, UA_LOGCATEGORY_SESSION, "Connection %i | SecureChannel %i | Session " PRINTF_GUID_FORMAT " | " MSG, \
|
|
(SESSION->channel ? (SESSION->channel->connection ? SESSION->channel->connection->sockfd : 0) : 0), \
|
|
(SESSION->channel ? (SESSION->channel->connection ? SESSION->channel->connection->sockfd : 0) : 0), \
|
|
(SESSION->channel ? SESSION->channel->securityToken.channelId : 0), \
|
|
(SESSION->channel ? SESSION->channel->securityToken.channelId : 0), \
|
|
- SESSION->sessionId.identifier.numeric, ##__VA_ARGS__);
|
|
|
|
|
|
+ PRINTF_GUID_DATA(SESSION->sessionId), \
|
|
|
|
+ ##__VA_ARGS__);
|
|
|
|
|
|
#define UA_LOG_WARNING_SESSION(LOGGER, SESSION, MSG, ...) \
|
|
#define UA_LOG_WARNING_SESSION(LOGGER, SESSION, MSG, ...) \
|
|
- UA_LOG_WARNING(LOGGER, UA_LOGCATEGORY_SESSION, "Connection %i | SecureChannel %i | Session %i | " MSG, \
|
|
|
|
|
|
+ UA_LOG_WARNING(LOGGER, UA_LOGCATEGORY_SESSION, "Connection %i | SecureChannel %i | Session " PRINTF_GUID_FORMAT " | " MSG, \
|
|
(SESSION->channel ? (SESSION->channel->connection ? SESSION->channel->connection->sockfd : 0) : 0), \
|
|
(SESSION->channel ? (SESSION->channel->connection ? SESSION->channel->connection->sockfd : 0) : 0), \
|
|
(SESSION->channel ? SESSION->channel->securityToken.channelId : 0), \
|
|
(SESSION->channel ? SESSION->channel->securityToken.channelId : 0), \
|
|
- SESSION->sessionId.identifier.numeric, ##__VA_ARGS__);
|
|
|
|
|
|
+ PRINTF_GUID_DATA(SESSION->sessionId), \
|
|
|
|
+ ##__VA_ARGS__);
|
|
|
|
|
|
#define UA_LOG_ERROR_SESSION(LOGGER, SESSION, MSG, ...) \
|
|
#define UA_LOG_ERROR_SESSION(LOGGER, SESSION, MSG, ...) \
|
|
- UA_LOG_ERROR(LOGGER, UA_LOGCATEGORY_SESSION, "Connection %i | SecureChannel %i | Session %i | " MSG, \
|
|
|
|
|
|
+ UA_LOG_ERROR(LOGGER, UA_LOGCATEGORY_SESSION, "Connection %i | SecureChannel %i | Session " PRINTF_GUID_FORMAT " | " MSG, \
|
|
(SESSION->channel ? (SESSION->channel->connection ? SESSION->channel->connection->sockfd : 0) : 0), \
|
|
(SESSION->channel ? (SESSION->channel->connection ? SESSION->channel->connection->sockfd : 0) : 0), \
|
|
(SESSION->channel ? SESSION->channel->securityToken.channelId : 0), \
|
|
(SESSION->channel ? SESSION->channel->securityToken.channelId : 0), \
|
|
- SESSION->sessionId.identifier.numeric, ##__VA_ARGS__);
|
|
|
|
|
|
+ PRINTF_GUID_DATA(SESSION->sessionId), \
|
|
|
|
+ ##__VA_ARGS__);
|
|
|
|
|
|
#define UA_LOG_FATAL_SESSION(LOGGER, SESSION, MSG, ...) \
|
|
#define UA_LOG_FATAL_SESSION(LOGGER, SESSION, MSG, ...) \
|
|
- UA_LOG_FATAL(LOGGER, UA_LOGCATEGORY_SESSION, "Connection %i | SecureChannel %i | Session %i | " MSG, \
|
|
|
|
|
|
+ UA_LOG_FATAL(LOGGER, UA_LOGCATEGORY_SESSION, "Connection %i | SecureChannel %i | Session " PRINTF_GUID_FORMAT " | " MSG, \
|
|
(SESSION->channel ? (SESSION->channel->connection ? SESSION->channel->connection->sockfd : 0) : 0), \
|
|
(SESSION->channel ? (SESSION->channel->connection ? SESSION->channel->connection->sockfd : 0) : 0), \
|
|
(SESSION->channel ? SESSION->channel->securityToken.channelId : 0), \
|
|
(SESSION->channel ? SESSION->channel->securityToken.channelId : 0), \
|
|
- SESSION->sessionId.identifier.numeric, ##__VA_ARGS__);
|
|
|
|
-
|
|
|
|
|
|
+ PRINTF_GUID_DATA(SESSION->sessionId), \
|
|
|
|
+ ##__VA_ARGS__);
|
|
|
|
|
|
#endif /* UA_SESSION_H_ */
|
|
#endif /* UA_SESSION_H_ */
|