/*
* This file is part of ARSnova Backend.
* Copyright (C) 2012-2017 The ARSnova Team
*
* ARSnova Backend is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ARSnova Backend is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package de.thm.arsnova.entities;
import java.util.Map;
public class LogEntry {
public enum LogLevel {
TRACE,
DEBUG,
INFO,
WARN,
ERROR,
FATAL
}
private String id;
private String rev;
private long timestamp;
private String event;
private int level;
private Map<String, Object> payload;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
/* CouchDB deserialization */
public void set_id(String id) {
this.id = id;
}
public String getRev() {
return rev;
}
public void setRev(String rev) {
this.rev = rev;
}
/* CouchDB deserialization */
public void set_rev(String rev) {
this.rev = rev;
}
public long getTimestamp() {
return timestamp;
}
public void setTimestamp(long timestamp) {
this.timestamp = timestamp;
}
public String getEvent() {
return event;
}
public void setEvent(String event) {
this.event = event;
}
public int getLevel() {
return level;
}
public void setLevel(int level) {
this.level = level;
}
public void setLevel(LogLevel level) {
this.level = level.ordinal();
}
public Map<String, Object> getPayload() {
return payload;
}
public void setPayload(Map<String, Object> payload) {
this.payload = payload;
}
}