Module Integration Guides
...
ESP32
ESP-IDF

Cloud Logging

5min

Cloud Logging is one of the most underrated features when it comes to remote debugging. With bytebeam-esp-idf-sdk it is as simple as Serial logging. Let me show you how,

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 to logs 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.

C++


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.

C++


Logging Level

We support multiple logging level ranging from BYTEBEAM_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.

C++


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 using bytebeam_disable_cloud_logging function anywhere in the code. By default, cloud logging is enabled inside the SDK.

C++


Have a look at cloud_logging example app for a full fledged example showing how you can use cloud logging feature to send some crucial information to bytebeam cloud.