This repository contains the sources for the client-side components of the LogFlake product suite for applications logs and performance collection for Python applications.
PyPI Package Name | Version | Downloads |
---|---|---|
LogFlake.Client.Python |
Retrieve your application-key from Application Settings in LogFlake UI.
from logflake import logflake
logger = logflake.LogFlake('application-key')
logger.send_log(logflake.LogLevels.DEBUG, None, 'Hello World')
logger.shutdown()
LOGGING = {
"version": 1,
"formatters": {
"logflake": {
"()": "django.utils.log.ServerFormatter",
"format": f"%(name)s %(module)s.%(funcName)s() %(message)s",
},
},
"handlers": {
"logflake": {
"class": "logflake.logflake.LogFlakeHandler", # REQUIRED
"app_id": "application-key", # REQUIRED
"formatter": "logflake", # OPTIONAL: Use custom formatter
"server": "https://app.logflake.io", # OPTIONAL: Use custom logging server
"level": logging.ERROR, # OPTIONAL: Set minimum severity
}
},
"root": {
"handlers": ["logflake"], # REQUIRED
},
}