2 * Copyright 2015 Samsung Electronics All Rights Reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package oic.simulator.logger;
19 import java.util.Date;
21 import oic.simulator.clientcontroller.manager.LogManager;
24 * Class for log entry.
26 public class LogEntry {
27 private final int severity;
28 private final Date date;
29 private final String message;
31 public LogEntry(int severity, Date date, String message) {
32 this.severity = severity;
34 this.message = message;
37 public String getMessage() {
41 public Date getDate() {
45 public int getSeverity() {
50 public String toString() {
51 String newline = System.getProperty("line.separator");
52 String out = date.toString() + newline;
53 out += "Severity: " + LogManager.getSeverityName(severity) + newline;
54 out += "Message: " + message + newline;
55 out += "===============================" + newline + newline;