• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2015 Google Inc. All rights reserved.
2// Use of this source code is governed by the Apache 2.0
3// license that can be found in the LICENSE file.
4
5package log
6
7// This file implements the logging API.
8
9import (
10	"golang.org/x/net/context"
11
12	"google.golang.org/appengine/internal"
13)
14
15// Debugf formats its arguments according to the format, analogous to fmt.Printf,
16// and records the text as a log message at Debug level. The message will be associated
17// with the request linked with the provided context.
18func Debugf(ctx context.Context, format string, args ...interface{}) {
19	internal.Logf(ctx, 0, format, args...)
20}
21
22// Infof is like Debugf, but at Info level.
23func Infof(ctx context.Context, format string, args ...interface{}) {
24	internal.Logf(ctx, 1, format, args...)
25}
26
27// Warningf is like Debugf, but at Warning level.
28func Warningf(ctx context.Context, format string, args ...interface{}) {
29	internal.Logf(ctx, 2, format, args...)
30}
31
32// Errorf is like Debugf, but at Error level.
33func Errorf(ctx context.Context, format string, args ...interface{}) {
34	internal.Logf(ctx, 3, format, args...)
35}
36
37// Criticalf is like Debugf, but at Critical level.
38func Criticalf(ctx context.Context, format string, args ...interface{}) {
39	internal.Logf(ctx, 4, format, args...)
40}
41