Configure the Log Stream
To push the log to Bytebeam Cloud you need to first create a stream. You can do this by following the Creating a Stream guide. Log stream is configured tologs
by default inside the SDK and you have the option to tune it as per your choice using bytebeam_log_stream_set
function. Once you have created a stream you can use the logging macros to publish the log to the stream.
Note: Make sure to add the tag, level and message fields i.e. (data type is String) while creating the stream.
Let’s send the log to Bytebeam Cloud
We have implemented the cloud logging in ESP-IDF Style so if you’re familiar with the ESP-IDF logging library, you can easily relate to it.Logging Level
We support multiple logging level ranging fromBYTEBEAM_LOG_LEVEL_NONE
to BYTEBEAM_LOG_LEVEL_VERBOSE
and the level of logging you want to achieve in your code can be set by using bytebeam_log_level_set
function anywhere in your code. When you call any logging macro the SDK will check the configured log level internally and will only log it if the log level is equal or less than the configured log level.
Enable/Disable Cloud Logging
Few cases exists where you don’t want to pump up the logs to cloud, In those scenarios you can disable the cloud logging usingbytebeam_disable_cloud_logging
function anywhere in the code. By default, cloud logging is enabled inside the SDK.