Skip to main content

lwsdebug

A lightweight logging utility for structured and prefixed debug output.
Enabled or disabled globally via LightweightSecureTCP::enableDebug(true).


lwsdebug

Return type: LWSDebugLine

Parameters:

  • const std::string& prefix (optional)

Creates a temporary debug line object.
Any output is printed only if debugging is enabled.


Usage

lwsdebug("[Server]") << "Started on port " << port << std::endl;

or

const std::string PREFIX = "[XTEA]";
lwsdebug(PREFIX) << "Encrypted: " << encrypted;