Documentation
¶
Index ¶
- type LogEntry
- func (e *LogEntry) GenerateTraceValue(projectID, traceFunctionName string) *LogEntry
- func (e LogEntry) LogCritical(message string)
- func (e LogEntry) LogError(message string)
- func (e LogEntry) LogInfo(message string)
- func (e LogEntry) String() string
- func (e *LogEntry) WithComponent(component string) *LogEntry
- func (e *LogEntry) WithLabel(key, value string) *LogEntry
- func (e *LogEntry) WithTrace(trace string) *LogEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogEntry ¶
type LogEntry struct {
Message string `json:"message"`
Severity string `json:"severity,omitempty"`
// Trace will be the same for one function call, you can use it for filetering in logs
Trace string `json:"logging.googleapis.com/trace,omitempty"`
Labels map[string]string `json:"logging.googleapis.com/operation,omitempty"`
// Cloud Log Viewer allows filtering and display of this as `jsonPayload.component`.
Component string `json:"component,omitempty"`
}
Entry defines a log entry.
func (*LogEntry) GenerateTraceValue ¶
func (LogEntry) LogCritical ¶
func (LogEntry) String ¶
String renders an entry structure to the JSON format expected by Cloud Logging.
func (*LogEntry) WithComponent ¶
Click to show internal directories.
Click to hide internal directories.