2 * Copyright 2017 ZTE Corporation.
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.
16 package org.openo.log.api;
18 import java.util.Date;
20 import org.openo.log.impl.Facitility;
21 import org.openo.log.impl.LogConst;
23 public class SecLogMessage extends LogMessage {
25 private static final long serialVersionUID = 201603100924009L;
28 public SecLogMessage() {
30 this.setLogType(LogConst.SERLOG_TYPE);
34 public SecLogMessage(String userName, String hostname, String detail, String logName,
37 this.setLogType(LogConst.SERLOG_TYPE);
39 this.userName = userName;
40 this.set("userName", userName);
42 this.hostname = hostname;
43 this.set("hostname", hostname);
45 this.logName = logName;
46 this.setLocale("logName", logName);
49 this.setLocale("detail", detail);
51 this.logDate = logDate;
52 this.set("logDate", Facitility.dateFormat(logDate));
55 protected String userName = "";
58 protected String logName = null;
61 protected String connectMode = "";
64 protected String systemID = "";
66 protected String mac = "";
68 public String getMac() {
72 public SecLogMessage setMac(String mac) {
79 protected Date logDate = null;
82 public String getUserName() {
88 public SecLogMessage setUserName(String userName) {
89 this.set("userName", userName);
90 this.userName = userName;
95 public String getConnectMode() {
100 public SecLogMessage setConnectMode(String connectMode) {
101 this.set("connectMode", connectMode);
102 this.connectMode = connectMode;
106 public String getLogName() {
110 public SecLogMessage setLogName(String logName) {
111 this.setLocale("logName", logName);
112 this.logName = logName;
116 public Date getLogDate() {
120 public SecLogMessage setLogDate(Date logDate) {
121 this.set("logDate", Facitility.dateFormat(logDate));
122 this.logDate = logDate;
126 public SecLogMessage setHostname(String hostname) {
127 this.set("hostname", hostname);
128 this.hostname = hostname;
133 public SecLogMessage setId(long id) {
140 public SecLogMessage setDetail(String detail) {
141 this.detail = detail;
142 this.setLocale("detail", detail);