<gh_stars>0

"""
Coralogix Python SDK Example
Author: Coralogix Ltd.
Email: <EMAIL>
"""

import logging
from coralogix.handlers import CoralogixLogger


PRIVATE_KEY = ""
APP_NAME = "python"
SUB_SYSTEM = "python"

# Get an instance of Python standard logger.
logger = logging.getLogger("Python Logger")
logger.setLevel(logging.DEBUG)

#Check if no handler is already initialized 
if not logger.handlers:        
# Get a new instance of Coralogix logger.
    coralogix_handler = CoralogixLogger(PRIVATE_KEY, APP_NAME, SUB_SYSTEM)
# Add coralogix logger as a handler to the standard Python logger.
    logger.addHandler(coralogix_handler)


# Send message
logger.info("Hello World!")
CoralogixLogger.flush_messages()

"""
Coralogix Python SDK Example
Author: Coralogix Ltd.
Email: <EMAIL>
"""

import logging
from coralogix.handlers import CoralogixLogger


PRIVATE_KEY = ""
APP_NAME = "python"
SUB_SYSTEM = "python"

# Get an instance of Python standard logger.
logger = logging.getLogger("Python Logger")
logger.setLevel(logging.DEBUG)

#Check if no handler is already initialized 
if not logger.handlers:        
# Get a new instance of Coralogix logger.
    coralogix_handler = CoralogixLogger(PRIVATE_KEY, APP_NAME, SUB_SYSTEM)
# Add coralogix logger as a handler to the standard Python logger.
    logger.addHandler(coralogix_handler)


# Send message
logger.info("Hello World!")
CoralogixLogger.flush_messages()
Coralogix Python SDK Example Author: Coralogix Ltd. Email: <EMAIL> # Get an instance of Python standard logger. #Check if no handler is already initialized # Get a new instance of Coralogix logger. # Add coralogix logger as a handler to the standard Python logger. # Send message