GcpFormatter
This class is a log formatter compatible with GCP Stackdriver logging.
Methods
Format()
@classmethod
def Format(
entry: *logrus.Entry
) - > ([]byte, error)
Formats a log entry into a byte slice suitable for GCP Stackdriver logging. This method is used to transform standard log entries into a format compatible with Google Cloud's logging service.
Parameters
| Name | Type | Description |
|---|---|---|
| entry | *logrus.Entry | The logrus entry to be formatted for GCP Stackdriver. |
Returns
| Type | Description |
|---|---|
([]byte, error) | A byte slice representing the formatted log entry and an error if formatting fails. |