Color Camera SDK for Windows

Overview

This section provides detailed information about how to use various functionalities of the Color Camera SDK to develop applications.

The Color Camera SDK allows Windows applications to be developed that communicate with the MP700 color camera.

The SDK provides an API that can be used by external applications to manage and control the camera specific functionality of a connected MP7 Color Camera over USB. The SDK allows camera configuration (setting/getting specific UVC camera properties), capturing snapshot images and streaming of camera video. Specific decode-image and related metadata (decode data) can also be retrieved using the SDK. The Camera SDK COM wrapper object allows calling the Camera SDK API from COM client applications. This COM wrapper supports multi-client communication with multiple cameras.


Basics

The Color Camera SDK provides the ability to manage camera connections (via the device manager class), perform various operations with connected cameras, configure connected cameras and retrieve information related to connected cameras via the ZebraCamera class.

Camera functionality is defined under the camera_sdk namespace. The application uses the ZebraCamera class to interact with a camera.

The DeviceManager class is used to register for device notification events to discover cameras (detect camera attach/detach events). The ZebraCameraManager class is used to manage connected cameras, create a connection to a specific camera, update firmware, reboot a specific camera.

If method calls fail, the corresponding method throws an exception. It is recommended to call all API methods in try-catch blocks for handling exceptions.


Camera Management

Camera DiscoveryCamera discovery is the first step to communicate with a zebra camera. Create a DeviceManager instance as follows:


#include "device_manager.h"
#include "device_manager_types.h"

using namespace zebra;

DeviceManager device_manager;           // Creating device manager

AttachedListener attached_listener;     // Create attached listener
DettachedListener detached_listener;    // Create detached listener

device_manager.AddDeviceAttachedListener(attached_listener);
device_manager.AddDeviceDetachedListener(detached_listener);

This registers callback functions that are notified when a Zebra MP7 camera is attached/detached. The callback event handler implementation is given below:


vector<DeviceInfo>device_list;
class AttachedListener :public DeviceAttachedListener
{
    public:
        void Attached(DeviceInfo dev_info) override
        { 
            device_list.push_back(dev_info);
            std::cout << "Device attached" << std::endl;
        }
};

class DettachedListener : public DeviceDetachedListener
{
    public:
        void Detached(DeviceInfo dev_info) override
        { 
            std::cout << "Device detached" << std::endl;
        }
}; 


To unregister from device notification:


// Remove device listeners
device_manager.RemoveDeviceAttachedListener(attached_listener);
device_manager.RemoveDeviceDetachedListener(detached_listener);

Camera Object Creation

To create a camera object, use a ZebraCameraManager instance and call the CreateZebraCamera method with the DeviceInfo object of the corresponding camera to connect (camera DeviceInfo objects are returned by calling EnumerateDevices). The DeviceInfo object received with the device attach event can also be used to create a camera object.


#include "device_manager.h"
#include "device_manager_types.h"
#include "zebra_camera.h"
#include "zebra_camera_manager.h"
#include "camera_types.h"

using namespace zebra;
using namespace camera_sdk;

ZebraCameraManager camera_manager;
DeviceManager device_manager;

vector <DeviceInfo> device_list = device_manager.EnumerateDevices();

auto camera = camera_manager.CreateZebraCamera(device_list[0]);

// Call camera specific functionality
std::cout << "Brightness:" << camera->Brightness.Value() << std::endl;


Camera Object Functionality

Camera Information

The following information is provided via camera object methods.

  • Model Number
  • Serial Number
  • Date of Manufacture
  • Date of First Program
  • First Service Date
  • Firmware Version
  • Hardware Version
  • Supported Frame Types
  • Current Frame Type

Camera Information

The following properties are configurable using the camera object.

  • Brightness
  • Contrast
  • Saturation
  • Sharpness
  • Gamma
  • White Balance Component
  • Backlight Compensation
  • Gain
  • Absolute Exposure Time
  • Video Mode Setting
  • Illumination Mode Setting
  • Power User Mode Setting

Retrieving Camera Information


// Get Camera Information
std::cout << "Serial Number : " << camera->GetSerialNumber() << std::endl;
std::cout << "Model Number : " << camera->GetModelNumber() << std::endl;
std::cout << "Firmware Version : " << camera->GetFirmwareVersion() << std::endl;
std::cout << "Date of First Service : " << camera->GetFirstServiceDate() << std::endl;
std::cout << "Date of Manufacture : " << camera->GetDateOfManufacture() << std::endl;
std::cout << "Date of First Program : " << camera->GetDateOfFirstProgram() << std::endl;
std::cout << "Hardware Version : " << camera->GetHardwareVersion() << std::endl;

Retrieving Camera Properties


// Call camera specific functionality
std::cout << "Brightness:" << camera->Brightness.Value() << std::endl;
std::cout << "Contrast:" << camera->Contrast.Value() << std::endl;
std::cout << "Saturation:" << camera->Saturation.Value() << std::endl;
std::cout << "Sharpness:" << camera->Sharpness.Value() << std::endl;
std::cout << "Gamma:" << camera->Gamma.Value() << std::endl;

Setting Camera Properties


// Get camera specific property (brightness)
int16_t minVal = camera->Brightness.Minimum();
int16_t maxVal = camera->Brightness.Maximum();
int16_t defVal = camera->Brightness.Default();

int16_t  newVal = minVal + 1;       // New value

camera->Brightness.Value(newVal);   // Set new value

Camera Object SDK Methods/Properties

Table 1: Methods and Properties

Method/Property Description
GetSerialNumber Get camera serial number
GetModelNumber Get camera model number
GetDateOfManufacture Get date of manufacture
GetDateOfFirstProgram Get date of first program
GetFirstServiceDate Get date of first service
GetFirmwareVersion Get camera firmware version
GetHardwareVersion Get camera hardware version
GetSupportedFrameTypes Get supported frame types
GetCurrentFrameType Get current frame type (frame format : YUY2/UYVY, width, height, frame rate)
Brightness Set/Get camera Brightness property
Contrast Set/Get camera Contrast property
Saturation Set/Get camera Saturation property
Sharpness Set/Get Sharpness property
Gamma Set/Get Gamma property
WhiteBalanceComponent Set/Get White Balance Component property
BacklightCompensation Set/Get Backlight Compensation property
Gain Set/Get Gain property
AbsoluteExposureTime Set/Get Absolute Exposure Time property (seconds)
VideoModeSetting

Set/Get Video Mode property

  • OFF: Color camera will not generate video frames
  • WAKEUP: Color camera generates video frames when MP7 is woken up (default)
  • CONTINUOUS: Color camera always generates video frames
IlluminationModeSetting

Set/Get Illumination Mode property

  • STANDARD: Standard Illumination mode (default)
  • ALWAYS : Illumination always on
  • ON,ALWAYS_OFF: Illumination always off
PowerUserModeSetting

Set/Get Power User Mode property

  • DISABLE / ENABLE : When Power User Mode is enabled Gain/White Balance Component/ White Balance Component (Auto) /Gamma are disabled.
CaptureSnapshot Capture Snapshot Image
SetDefaults Set camera parameters to default values
AddContinuousImageEventListener Add listener for continuous image events
RemoveContinuousImageEventListener Remove listener for continuous image events
AddSnapshotImageEventListener Add listener for snapshot-image events
RemoveSnapshotImageEventListener Remove listener for snapshot-image events
AddProduceImageEventListener Add listener for produce-image events
RemoveProduceImageEventListener Remove listener for produce-image events
AddDecodeImageEventListener Add listener for decode-image events (generated when barcode scanned)
RemoveDecodeImageEventListener Remove listener for decode-image events
AddDecodeSessionStatusChangeEventListener Add listener for decode-session-status-change events
RemoveDecodeSessionStatusChangeEventListener Remove listener for decode-session-status-change events

Managing Events

Applications can register for one or more events, to be notified when it occurs. There are several types of events:

Table 2: Events

Event Description
ContinuousImageEvent Event notifying continuous image events.
SnapshotImageEvent Event notifying snapshot image events, triggered when CaptureSnapshot method called or when camera snapshot button pressed on MP7.
ProduceImageEvent Event notifying produce-image events. Image event triggered when weight placed on MP7.
DecodeImageEvent Event notifying decode-image events. Image event triggered when barcode scanned with MP7. (decode data is available as metadata provided in callback event arguments).
DecodeSessionStatusChangeEvent Event notifying decode-session-status-change events. Decode-Session-Status-Change event triggered when barcode detection started/stopped in field of view of MP7.

Image Events

Image events returns the following image data structure:


ImageEventData.ImageFormat  - Image formats: RGB,YUY2,UYVY
ImageEventData.image        - raw image buffer

Image events also return an additional image meta data structure that contain image number and additional information such as decode data (for decode image events).

Continuous Image Event Notification

Continuous image events are fired whenever image frames are available from the MP7 color camera. To trigger events call AddContinuousImageEventListener with event handler object, and set VideoModeSetting to CONTINUOUS. The following example shows how to receive continuous image events.

Create an image event handler class to receive event notifications:


// Continuous image event handler class
class ContinuousImageEventObserver : public ContinuousImageEventListener {
    public:
        void ImageReceived(ImageEventData ev, ImageEventMetaData meta_data) {
            printf("width=%d, height=%d\r\n", ev.image.width, ev.image.height);
        }
    };

Register for continuous image events to receive notifications:


// Set Video Mode to continuous
camera->VideoModeSetting.Value(VideoMode::CONTINUOUS);
ContinuousImageEventObserver continuous_image_event_observer;

// Register for continuous image event notification
camera->AddContinuousImageEventListener(continuous_image_event_observer);
std::cout << "Capturing video...." << std::endl;

//Wait for video stream capture
getchar();

Derive from ContinuousImageEventListener and implement the ImageReceived callback in the image event handler. The image event triggered returns the image data (and attributes: width/height).

Image Conversion and Saving

Use the Image Converter Encode API to convert the returned image buffer stream to a JPEG/BMP. The Encode method can be used to convert returned image data to a bitmap or jpeg buffer (that can be written to a file) as shown below:


// Continuous image event handler class
class ContinuousImageEventObserver : public ContinuousImageEventListener {
    public:
        void ImageReceived(ImageEventData ev, ImageEventMetaData meta_data) {
            printf("width=%d, height=%d\r\n", ev.image.width, ev.image.height);
            std::vector<uint8_t> bmp_image_buffer = Encode(FileConverter::YUY2_TO_BMP, ev.image);
            std::ofstream bmp_image_file_stream("outputImage.bmp", std::ios_base::binary);
            bmp_image_file_stream.write((const char*)&bmp_image_buffer[0], bmp_image_buffer.size());
            bmp_image_file_stream.close();
            std::vector<uint8_t> jpeg_image_buffer = Encode(FileConverter::YUY2_TO_JPEG, ev.image);
            std::ofstream jpeg_image_file_stream("outputImage.jpeg", std::ios_base::binary);
            jpeg_image_file_stream.write((const char*)&jpeg_image_buffer[0], jpeg_image_buffer.size());
            jpeg_image_file_stream.close();
        }
    };

Snapshot Image Event Notification

Snapshot image event gets fired when the user presses the camera snapshot button on the MP7000. The following example shows how to receive/save snapshot image events.

Create an image event handler class to receive snapshot event notifications:


// Snapshot image event handler class
class SnapshotImageEventObserver : public SnapshotImageEventListener {
    public:
        void ImageReceived(ImageEventData ev, ImageEventMetaData md) {
            printf("Snapshot Event Triggered: width=%d, height=%d\r\n",ev.image.width,ev.image.height);
            std::vector<uint8_t> bmp_image_buffer = Encode(FileConverter::YUY2_TO_BMP, ev.image);
            std::ofstream bmp_image_file_stream("outputImage.bmp", std::ios_base::binary);
            bmp_image_file_stream.write((const char*)&bmp_image_buffer[0], bmp_image_buffer.size());
            bmp_image_file_stream.close();
            std::vector<uint8_t> jpeg_image_buffer = Encode(FileConverter::YUY2_TO_JPEG, ev.image);
            std::ofstream jpeg_image_file_stream("outputImage.jpeg", std::ios_base::binary);
            jpeg_image_file_stream.write((const char*)&jpeg_image_buffer[0], jpeg_image_buffer.size());
            jpeg_image_file_stream.close();
        }
};

Register for snapshot image events to receive notifications:


//Register for snapshot image event notification
SnapshotImageEventObserver snapshot_image_event_observer;
camera->AddSnapshotImageEventListener(snapshot_image_event_observer);
std::cout << "Capturing Snapshot (press MP7 snapshot button) ..." << std::endl;

//Wait for snapshot image event
getchar();

Derive from SnapshotImageEventListener and implement the ImageReceived callback in the image event handler. The image event triggered returns the image data (and attributes: width/height).

Decode Image Event Notification

Decode image event is fired when the MP7000 performs a barcode decode. The decode image event contains a color image of the item scanned. The image event meta data contains the corresponding barcode decode data (Note: decode data returned is limited to a maximum of 25 characters). The following example shows how to receive/save decode image events.

Create an image event handler class to receive decode event notifications:


// Decode image event handler class
class DecodeImageEventObserver : public DecodeImageEventListener {
    public:
        void ImageReceived(ImageEventData ev, ImageEventMetaData md) {
            printf("Decode Event Triggered: width=%d, height=%d\r\n",ev.image.width,ev.image.height);
            printf("Image Number :%d\r\n", md.image_number);
            printf("Decode Data :%s\r\n", md.decode_data.c_str());

            std::vector<uint8_t> bmp_image_buffer = Encode(FileConverter::YUY2_TO_BMP, ev.image);
            std::ofstream bmp_image_file_stream("outputImage.bmp", std::ios_base::binary);
            bmp_image_file_stream.write((const char*)&bmp_image_buffer[0], bmp_image_buffer.size());
            bmp_image_file_stream.close();

            std::vector<uint8_t> jpeg_image_buffer = Encode(FileConverter::YUY2_TO_JPEG, ev.image);
            std::ofstream jpeg_image_file_stream("outputImage.jpeg", std::ios_base::binary);
            jpeg_image_file_stream.write((const char*)&jpeg_image_buffer[0], jpeg_image_buffer.size());
            jpeg_image_file_stream.close();

            // Retrieve decode data
            string decode_data = md.decode_data;
        }
};

Register for decode image events to receive notifications:


//Register for decode image event notification
DecodeImageEventObserver decode_image_event_observer;
camera->AddDecodeImageEventListener(decode_image_event_observer);
std::cout << "Scan barcode to trigger decode image event ..." << std::endl;

//Wait for decode image event
getchar();

Derive from DecodeImageEventListener and implement the ImageReceived callback in the image event handler. The image event triggered returns the image data (and attributes: width/height). The decoded barcode data that corresponds to the decode image event can be retrieved using returned metadata.

Produce Image Event Notification

Produce event gets fired when the MP7000 scale detects a non-zero stable weight on the platter. The following example shows how to receive/save produce-image events.

Create an image event handler class to receive produce-image event notifications:


// Produce image event handler class
class ProduceImageEventObserver : public ProduceImageEventListener {
    public:
        void ImageReceived(ImageEventData ev, ImageEventMetaData md) {
            printf("Produce Event Triggered: width=%d, height=%d\r\n", ev.image.width, ev.image.height);
            std::vector<uint8_t> bmp_image_buffer = Encode(FileConverter::YUY2_TO_BMP, ev.image);
            std::ofstream bmp_image_file_stream("outputImage.bmp", std::ios_base::binary);
            bmp_image_file_stream.write((const char*)&bmp_image_buffer[0], bmp_image_buffer.size());
            bmp_image_file_stream.close();
            std::vector<uint8_t> jpeg_image_buffer = Encode(FileConverter::YUY2_TO_JPEG, ev.image);
            std::ofstream jpeg_image_file_stream("outputImage.jpeg", std::ios_base::binary);
            jpeg_image_file_stream.write((const char*)&jpeg_image_buffer[0], jpeg_image_buffer.size());
            jpeg_image_file_stream.close();
        }
};

Register for produce-image events to receive notifications:


//Register for produce image event notification
ProduceImageEventObserver produce_image_event_observer;
camera->AddProduceImageEventListener(produce_image_event_observer);
std::cout << "Place weight on MP7 to trigger produce image event ..." << std::endl;

//Wait for produce-image event
getchar();

Derive from ProduceImageEventListener and implement the ImageReceived callback in the image event handler. The image event triggered returns the image data (and attributes: width/height).

Decode Session Event Notification

When barcode detection is started in the field of view of the Bioptic/MP7 the Decode Session Start event is triggered, and when barcode detection ends in the field of view the Decode Session End event is triggered by the Camera SDK. The following example shows how to programmatically detect Decode Session Start/End events.


DecodeSessionStatusChangeEventHandler* decode_session_status_change_event_handler_ = nullptr;
decode_session_status_change_event_handler_ = new DecodeSessionStatusChangeEventHandler(this);

// Register for decode session status change events
camera_->AddDecodeSessionStatusChangeEventListener(*decode_session_status_change_event_handler_);

// Wait for trigger of decode session events …

// Unregister for decode session status change events
camera_->RemoveDecodeSessionStatusChangeEventListener(*decode_session_status_change_event_handler_);


// Class to handle decode session status change events
class DecodeSessionStatusChangeEventHandler :public DecodeSessionStatusChangeEventListener
{
    public:
        void DecodeSessionStatusChanged(DecodeSessionStatus status)
        {
            if (status == DecodeSessionStatus::DECODE_SESSION_START)
            {
                std::cout << "Decode Session Start event triggered" << std::endl;
            }
            else if (status == DecodeSessionStatus::DECODE_SESSION_END)
            {
                std::cout << "Decode Session End event triggered" << std::endl;
            }
        }
};

Set Defaults

Reset camera parameters to defaults by calling the SetDefaults method as follows:


// Set Defaults 
camera->SetDefaults();

Capture Snapshot

To trigger snapshot image event programmatically, call the CaptreSnapshot method as follows:


// Capture Snapshot Image 
camera->CaptureSnapshot();

Device Management

The DeviceManager class methods can be used to discover connected cameras and receive notification of MP7 camera attach/detach events (see previous “Camera Discovery” section of document). Connected cameras can be retrieve as follows:


DeviceManager device_manager;       // Creating device manager

// Enumerate device list 
auto device_list= device_manager.EnumerateDevices();
getchar();

Reboot Camera

The following example shows how to programmatically reboot the MP7 Camera. The Reboot method is a blocking call, the calling thread blocks until the camera gets rebooted. This method has a parameter that defines the timeout for the blocking call.


ZebraCameraManager camera_manager;  // Create camera manager object

// Reboot the specified camera 
camera_manager.Reboot(camera, 10000);

Load Configuration

The following example shows how to programmatically load a settings configuration string to the camera. Following is the sample setting XML:


<cameraconfig>
    <metadata>
        <modelnumber>XXXXXXXXXXXXXXXXXX</modelnumber>
        <serialnumber>XXXXXXXXXXXXXXXX</serialnumber>
        <firmware>CAAERS00-001-N21</firmware>
        <hardwareversion>1</hardwareversion>
    </metadata>
    <attrib_list>
        <attribute>
            <id>8194</id>
            <name>Brightness</name>
            <value>8</value>
        </attribute>
        <attribute>
            <id>8195</id>
            <name>Constrast</name>
            <value>10</value>
        </attribute>
        <attribute>
            <id>8199</id>
            <name>Saturation</name>
            <value>8</value>
        </attribute>
        <attribute>
            <id>8200</id>
            <name>Sharpness</name>
            <value>4</value>
        </attribute>
        <attribute>
            <id>8201</id>
            <name>Gamma</name>
            <value>25</value>
        </attribute>
        <attribute>
            <id>8204</id>
            <name>White alance</name>
            <value>
                <red>3469</red>
                <blue>11735</blue>
            </value>
        </attribute>
        <attribute>
            <id>8193</id>
            <name>Backlight</name>
            <value>10</value>
        </attribute>
        <attribute>
            <id>8196</id>
            <name>Gain</name>
            <value>3</value>
        </attribute>
        <attribute>
            <id>2052</id>
            <name>Absolute Exposure Time</name>
            <value>-10</value>
        </attribute>
        <attribute>
            <id>32769</id>
            <name>Video Mode</name>
            <value>2</value>
        </attribute>
        <attribute>
            <id>32770</id>
            <name>Illumination Mode</name>
            <value>0</value>
        </attribute>
    </attrib_list>
</cameraconfig>

To persist configuration, set the persist parameter to true.


ZebraCameraManager camera_manager;  // Create camera manager object
string config_xml;
// Load configuration settings xml file as string 
config_xml = …
// Load configuration file to camera 
zebra_camera_manager.LoadConfiguration(camera, config_xml, true);

Retrieve Configuration

The following example shows how to programmatically retrieve a xml settings configuration string from the camera.


ZebraCameraManager camera_manager;  // Create camera manager object
string config_xml;

// Retrieve configuration file from camera 
config_xml= zebra_camera_manager.RetrieveConfiguration(camera);

Firmware Update

The following example shows how to update firmware of the MP7 Camera, and receive firmware download status events. To register for firmware download notification events call AddFirmwareDownloadEventListener with corresponding event handler object.


bool session_stop = false;
// Firmware event handler class
class FirmwareEventHandler :public FirmwareDownloadEventListener
{
    void EventReceived(FirmwareDownloadEventsArgs event_args) override
    {
        if (event_args.GetOperationCode() == FirmwareDownloadEventsArgs::OperationCode::kSessionStart)
        {
            std::cout << "[FirmwareDownloadEvent][SessionStart]" << std::endl;
        }
        if (event_args.GetOperationCode() == FirmwareDownloadEventsArgs::OperationCode::kDownloadStart)
        {
            std::cout << "[FirmwareDownloadEvent][DownloadStart]" << std::endl;
        }
        if (event_args.GetOperationCode() == FirmwareDownloadEventsArgs::OperationCode::kProgress)
        {
            std::cout << "[FirmwareDownloadEvent][Progress]" << to_string(event_args.GetCurrentRecord()) << "/" << to_string(event_args.GetTotalRecords()) << std::endl;
        }
        if (event_args.GetOperationCode() == FirmwareDownloadEventsArgs::OperationCode::kDownloadEnd)
        {
            std::cout << "[FirmwareDownloadEvent][DownloadEnd]" << std::endl;
        }
        if (event_args.GetOperationCode() == FirmwareDownloadEventsArgs::OperationCode::kSessionStop)
        {
            std::cout << "[FirmwareDownloadEvent][SessionStop]" << std::endl;
            session_stop = true;
        }
    }
};

To start firmware download call DownloadFirmware with the corresponding firmware file. (firmware update progress is reported).


ZebraCameraManager camera_manager;  // Create camera manager object
//Firmware update event handler
FirmwareEventHandler firmware_event_handler;
//Register for firmware download events
camera_manager.AddFirmwareDownloadEventListener(firmware_event_handler);
std::string firmware_file("CAAERS00-001-N15D0.DAT");
//Start firmware download
camera_manager.DownloadFirmware(camera, firmware_file);
// Wait for session end
std::chrono::system_clock::time_point startTime = std::chrono::system_clock::now();
while (session_stop == false)
{
    this_thread::sleep_for(std::chrono::milliseconds(10));
    auto newTime = std::chrono::system_clock::now();
}
camera_manager.RemoveFirmwareDownloadEventListener(firmware_event_handler);
// Flash firmware 
camera_manager.InstallFirmware(camera);

Once the firmware download is complete call InstallFirmware to start flashing the firmware to the camera. Wait for the camera firmware to flash. To unregister for firmware download events call RemoveFirmwareDownloadEventListener. To cancel firmware download, call the CancelFirmwareDownload method.


ZebraCameraManager camera_manager;  // Create camera manager object

// Cancel firmware download  
config_xml= zebra_camera_manager.CancelFirmwareDownload(camera);


SDK Logging Configuration

The default setting disables log file generation for Bioptic Color Camera v1.00.0013 and earlier versions. To activate logging, follow the steps outlined below:

  1. Install Bioptic Color Camera for Windows on the PC.
  2. Copy spdlog_configuration.xml file from "C:\Program Files (x86) \Zebra Technologies\Barcode Scanners\Bioptic Camera\Sample Applications\src\SampleApp_CPP" and place in "C:\Program Files (x86) \Zebra Technologies\Barcode Scanners\Bioptic Camera\SDK\Release\bin\x86" with sample application executables.
  3. Create a new folder with the name "Logs" in the same location (inside "C:\Program Files (x86) \Zebra Technologies\Barcode Scanners\Bioptic Camera\SDK\Release\bin\x86") and grant access rights.
  4. Execute Camera SDK Sample Applications.

Below attributes are configurable through the spdlog_configuration.xml file.

  1. log_file_name : By default, log files generated will be saved with the name CameraSDKLog.log.
  2. log_file_path : Indicates where the log files will be saved. For Bioptic Color Camera v1.00.0013 and earlier versions, Log folder needs to be created, and read/write permission should be granted manually.
  3. max_file_size : Maximum file size in Kilo Bytes (considering 1KB = 1024B). Minimum size is 5KB and if any value less is defined, it will be defaulted to the minimum value.
  4. max_file_count : Maximum file count. The minimum is 1 and anything less or invalid value will be defaulted to 1.
  5. log_pattern : By default, the pattern of a log line will be “[%H:%M:%S:%e] [T%t] [P%P] [%l] [%s] [%#] [%!] %v". A single log entry pattern can be customized with the following options.

    1. %H - Hours in 24 format 00-23
    2. %M - Minutes 00-59
    3. %S - Seconds 00-59
    4. %e - Millisecond part of the current second 000-999
    5. %t - Tread ID
    6. %P - Process ID
    7. %l - The log level of the message
    8. %s - Base name of the source file
    9. %# - Source line
    10. %! - Source Function
    11. %v - The actual text to log
  6. log_level : Log level to be recorded. 2 = INFO, 3 = WARNING, 4 = ERROR, 5 = CRITICAL 6 = LOG_OFF, 0,1 = TRACE, DEBUG