1 /*
2 * Copyright 2011 The Kuali Foundation.
3 *
4 * Licensed under the Educational Community 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
7 *
8 * http://www.opensource.org/licenses/ecl2.php
9 *
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.
15 */
16 package org.kuali.ole.logger;
17
18
19 import org.slf4j.Logger;
20 import org.slf4j.LoggerFactory;
21
22 public class DocStoreLogger {
23 private Logger logger;
24
25 public DocStoreLogger(String loggingClassName) {
26 try {
27 logger = LoggerFactory.getLogger(Class.forName(loggingClassName));
28
29 }
30 catch (ClassNotFoundException e) {
31 System.out.println("ClassNotFoundException: " + e.getMessage());
32 }
33 }
34
35 public void log(String logMessage) {
36 logger.info(logMessage);
37 }
38
39 public void log(String logMessage, Exception e) {
40 logger.error(logMessage + e.getMessage());
41 }
42
43 public void logDebugMsg(String logMessage) {
44 logger.debug(logMessage);
45 }
46 }