blob: 87a9d5fc14248d0776b7d0261cd442d8a9086067 (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
/*******************************************************************************
* Copyright (c) 2006 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.wst.wsdl.validation.internal.logging;
/**
* The logger factory allows for simple use of whatever logging mechanism is in
* place. The tool can specify a custom ILogger. The WSDL validator will request the
* logger from this class.
*/
public class LoggerFactory
{
private static LoggerFactory factory = null;
private ILogger logger = null;
/**
* Get the one and only instance of the logger factory.
*
* @return The one and only instance of the logger.
*/
public static LoggerFactory getInstance()
{
if(factory == null)
{
factory = new LoggerFactory();
}
return factory;
}
/**
* Set the logger implementation to be used.
*
* @param logger
* The ILogger to use.
*/
public void setLogger(ILogger logger)
{
this.logger = logger;
}
/**
* Get the logger.
*
* @return
* The logger.
*/
public ILogger getLogger()
{
if(logger == null)
{
logger = new StandardLogger();
}
return logger;
}
}
|