aboutsummaryrefslogtreecommitdiffstats
path: root/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/LogEntry.java
blob: 06d834259e5bb25b607ca02ed2229a54df28e6f4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.controller.api.application.v4.model;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * @author gjoranv
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class LogEntry {

    public final long time;
    public final String level;
    public final String message;

    @JsonCreator
    public LogEntry(@JsonProperty("time") long time,
                    @JsonProperty("level") String level,
                    @JsonProperty("message") String message) {
        this.time = time;
        this.level = level;
        this.message = message;
    }

    @Override
    public String toString() {
        return "LogEntry{" +
                "time=" + time +
                ", level='" + level + '\'' +
                ", message='" + message + '\'' +
                '}';
    }
}