Environment Configuration
This section documents environment variables and configuration options.
Environment Variables
Environment Variable Names
- dftracer.python.env.DFTRACER_ENABLE_ENV = "DFTRACER_ENABLE"
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
- dftracer.python.env.DFTRACER_INIT_ENV = "DFTRACER_INIT"
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
- dftracer.python.env.DFTRACER_LOG_LEVEL_ENV = "DFTRACER_LOG_LEVEL"
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
Logger Setup
Configuration Examples
Enable DFTracer
export DFTRACER_ENABLE=1
Set Log Level
export DFTRACER_LOG_LEVEL=INFO
Set Initialization Mode
export DFTRACER_INIT=PRELOAD
Checking Configuration
In Python code:
from dftracer.python import (
DFTRACER_ENABLE,
DFTRACER_INIT_PRELOAD,
DFTRACER_LOG_LEVEL
)
if DFTRACER_ENABLE:
print("DFTracer is enabled")
print(f"Log level: {DFTRACER_LOG_LEVEL}")
print(f"Preload mode: {DFTRACER_INIT_PRELOAD}")