service: "payment-processor"
region: "us-west"
error.code: "500"
error.details: "Database connection failed"
msg
field as the main log messageerror.code = "500"
service = "payment-processor"
error.details = regex: .*connection.*
msg
fieldmessage
fieldmsg
or message
field in your JSON logs for better readability.
Move all other fields to log attributes for easy searchingtimestamp: "2024-03-15T10:30:00Z"
level: "error"
service: "order-service"
order_id: "12345"
error_code: "500"
level
: Log level (I=info, D=debug, W=warning, E=error, C=critical)module
: The module nameline
: The line numberfield = "value"
field = regex: pattern
field = ["value1", "value2"]
parent.child = "value"