1 // Copyright 2011 Google Inc. All Rights Reserved.
3 package com
.google
.appengine
.api
.log
;
5 import com
.google
.appengine
.api
.log
.LogService
.LogLevel
;
8 * An AppLogLine contains all the information for a single application
9 * log. Specifically, this information is: (1) the time at which the logged
10 * event occurred, (2) the level that the event was logged at, and (3) the
11 * message associated with this event. AppLogLines may be inserted by the user
12 * via logging frameworks, or by App Engine itself if we wish to alert the user
13 * that certain events have occurred.
17 public final class AppLogLine
{
18 private long timeUsec
;
19 private LogLevel logLevel
;
20 private String logMessage
;
23 * Default zero-argument constructor that creates an AppLogLine.
30 * Constructs a new application log.
32 * @param newTimeUsec The time that the logged event has occurred at, in
33 * microseconds since epoch.
34 * @param newLogLevel The level that the event was logged at.
35 * @param newLogMessage The message associated with this event.
37 AppLogLine(long newTimeUsec
, LogLevel newLogLevel
, String newLogMessage
) {
38 timeUsec
= newTimeUsec
;
39 logLevel
= newLogLevel
;
40 logMessage
= newLogMessage
;
43 public LogLevel
getLogLevel() {
47 public String
getLogMessage() {
51 public long getTimeUsec() {
55 public void setLogLevel(LogLevel logLevel
) {
56 this.logLevel
= logLevel
;
59 public void setLogMessage(String logMessage
) {
60 this.logMessage
= logMessage
;
63 public void setTimeUsec(long timeUsec
) {
64 this.timeUsec
= timeUsec
;
68 public String
toString() {
69 return "AppLogLine{" +
70 "timeUsec=" + timeUsec
+
71 ", logLevel=" + logLevel
+
72 ", logMessage='" + logMessage
+ '\'' +