Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupSourceLocation ¶ added in v0.0.54
Types ¶
type Client ¶
type Client interface { // Logger returns a logger with a provided logID. Logger(logID string) Logger // Close waits for all opened loggers to be flushed and closes the client. Close() error }
Client is used to provision new loggers and close underlying connections during shutdown.
func NewStandardClient ¶
NewStandardClient returns a new StandardClient that writes to writer.
type GkeClient ¶
type GkeClient struct {
// contains filtered or unexported fields
}
GkeClient is a Logging client. A Client is associated with a single Cloud project.
func NewGkeClient ¶
NewGkeClient returns a new logging client associated with the provided parent. A parent can take any of the following forms:
projects/PROJECT_ID folders/FOLDER_ID billingAccounts/ACCOUNT_ID organizations/ORG_ID
for backwards compatibility, a string with no '/' is also allowed and is interpreted as a project ID.
Note: NewGkeClient uses WriteScope.
func (GkeClient) Logger ¶
Logger returns a Logger that will write entries with the given log ID, such as "syslog". A log ID must be less than 512 characters long and can only include the following characters: upper and lower case alphanumeric characters: [A-Za-z0-9]; and punctuation characters: forward-slash, underscore, hyphen, and period.
type Logger ¶
type Logger interface { // StandardLogger returns a *log.Logger for a given severity. StandardLogger(severity logging.Severity) *log.Logger // Log queues a single log entry. Log(entry logging.Entry) // Flush flushes the queued log entries. Flush() error // LogSync logs the Entry synchronously. LogSync(ctx context.Context, entry logging.Entry) error }
Logger logs entries to a single log.
type StandardClient ¶
type StandardClient struct {
// contains filtered or unexported fields
}
StandardClient wraps a standard logger. See *log.Logger
func (StandardClient) Close ¶
func (s StandardClient) Close() error
Close implements log.Client.Close(). For StandardClient, it is a no-op.
func (StandardClient) Logger ¶
func (s StandardClient) Logger(logID string) Logger
Logger returns a logger with a provided logID.