LogMessage
class LogMessage(val message: LogMessageContent, val details: String? = null, val type: LogMessageType = message.inferType(), val location: String? = null, val pubNubId: String? = null, val logLevel: Level? = null, val timestamp: String = LocalTime.now().format(DateTimeFormatter.ofPattern("HH:mm:ss.SSS")))
Represents a structured log message with validation and sanitization.
Parameters
pubNubId
The PubNub instance identifier
logLevel
The logging level
location
The source location of the log
type
The type of log message (automatically inferred from message content)
message
The log message content
details
Optional additional details (will be sanitized)
timestamp
The timestamp when the log was created
Constructors
Link copied to clipboard
constructor(message: LogMessageContent, details: String? = null, type: LogMessageType = message.inferType(), location: String? = null, pubNubId: String? = null, logLevel: Level? = null, timestamp: String = LocalTime.now().format(DateTimeFormatter.ofPattern("HH:mm:ss.SSS")))