forked from OpenLiberty/open-liberty
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# This is a combination of 4 commits.
# This is the 1st commit message: CXF Original # This is the commit message OpenLiberty#2: Traces are added # This is the commit message OpenLiberty#3: Remove FAT bundle changes # This is the commit message OpenLiberty#4: WIP
- Loading branch information
1 parent
a113451
commit 68471f1
Showing
42 changed files
with
2,945 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...2.2.webcontainer_fat/publish/servers/AnnotatedHandlerChainTestServer/bootstrap.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
bootstrap.include=../testports.properties | ||
bootstrap.include=../testports.properties | ||
com.ibm.ws.logging.trace.specification=org.apache.cxf.*=all=enabled |
3 changes: 2 additions & 1 deletion
3
...2.webcontainer_fat/publish/servers/BindingTypeWsdlMismatchTestServer/bootstrap.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
bootstrap.include=../testports.properties | ||
bootstrap.include=../testports.properties | ||
com.ibm.ws.logging.trace.specification=org.apache.cxf.*=all=enabled |
3 changes: 2 additions & 1 deletion
3
...s.jaxws.2.2.webcontainer_fat/publish/servers/CXFJMXSupportTestServer/bootstrap.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
bootstrap.include=../testports.properties | ||
bootstrap.include=../testports.properties | ||
com.ibm.ws.logging.trace.specification=org.apache.cxf.*=all=enabled |
3 changes: 2 additions & 1 deletion
3
...jaxws.2.2.webcontainer_fat/publish/servers/CatalogFacilityTestServer/bootstrap.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
bootstrap.include=../testports.properties | ||
bootstrap.include=../testports.properties | ||
com.ibm.ws.logging.trace.specification=org.apache.cxf.*=all=enabled |
3 changes: 2 additions & 1 deletion
3
...bcontainer_fat/publish/servers/EJBinWarEndpointAddressOverrideServer/bootstrap.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
bootstrap.include=../testports.properties | ||
bootstrap.include=../testports.properties | ||
com.ibm.ws.logging.trace.specification=org.apache.cxf.*=all=enabled |
3 changes: 2 additions & 1 deletion
3
...ws.jaxws.2.2.webcontainer_fat/publish/servers/EJBinWarOverrideServer/bootstrap.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
bootstrap.include=../testports.properties | ||
bootstrap.include=../testports.properties | ||
com.ibm.ws.logging.trace.specification=org.apache.cxf.*=all=enabled |
3 changes: 2 additions & 1 deletion
3
...ws.2.2.webcontainer_fat/publish/servers/EndpointPropertiesTestServer/bootstrap.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
bootstrap.include=../testports.properties | ||
bootstrap.include=../testports.properties | ||
com.ibm.ws.logging.trace.specification=org.apache.cxf.*=all=enabled |
3 changes: 2 additions & 1 deletion
3
dev/com.ibm.ws.jaxws.2.2.webcontainer_fat/publish/servers/HolderServer/bootstrap.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
bootstrap.include=../testports.properties | ||
bootstrap.include=../testports.properties | ||
com.ibm.ws.logging.trace.specification=org.apache.cxf.*=all=enabled |
3 changes: 2 additions & 1 deletion
3
...2.2.webcontainer_fat/publish/servers/HttpConduitPropertiesTestServer/bootstrap.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
bootstrap.include=../testports.properties | ||
bootstrap.include=../testports.properties | ||
com.ibm.ws.logging.trace.specification=org.apache.cxf.*=all=enabled |
2 changes: 1 addition & 1 deletion
2
...container_fat/publish/servers/LibertyCXFNegativePropertiesTestServer/bootstrap.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
bootstrap.include=../testports.properties | ||
# Please do not remove the trace below! This is required to check PropertySettingsTest test | ||
com.ibm.ws.logging.trace.specification=*=info=enabled:LogService=all:com.ibm.ws.jaxws.utils.*=all:org.apache.cxf.ws.policy=fine:org.apache.cxf.jaxws.interceptors=fine | ||
com.ibm.ws.logging.trace.specification=*=info=enabled:LogService=all:com.ibm.ws.jaxws.utils.*=all:org.apache.cxf.ws.policy=fine:org.apache.cxf.jaxws.interceptors=fine:org.apache.cxf.*=all=enabled |
2 changes: 1 addition & 1 deletion
2
...container_fat/publish/servers/LibertyCXFPositivePropertiesTestServer/bootstrap.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
bootstrap.include=../testports.properties | ||
# Please do not remove the trace below! This is required to check PropertySettingsTest test | ||
com.ibm.ws.logging.trace.specification=*=info=enabled:LogService=all:org.apache.cxf.ws.policy=fine:org.apache.cxf.jaxws.*=fine | ||
com.ibm.ws.logging.trace.specification=*=info=enabled:LogService=all:org.apache.cxf.ws.policy=fine:org.apache.cxf.jaxws.*=fine:org.apache.cxf.*=all=enabled | ||
cxf.multipart.attachment=false | ||
cxf.ignore.unsupported.policy=true |
3 changes: 2 additions & 1 deletion
3
dev/com.ibm.ws.jaxws.2.2.webcontainer_fat/publish/servers/LoggingServer/bootstrap.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
bootstrap.include=../testports.properties | ||
bootstrap.include=../testports.properties | ||
com.ibm.ws.logging.trace.specification=org.apache.cxf.*=all=enabled |
3 changes: 2 additions & 1 deletion
3
...com.ibm.ws.jaxws.2.2.webcontainer_fat/publish/servers/MTOMTestServer/bootstrap.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
bootstrap.include=../testports.properties | ||
bootstrap.include=../testports.properties | ||
com.ibm.ws.logging.trace.specification=org.apache.cxf.*=all=enabled |
3 changes: 2 additions & 1 deletion
3
....ibm.ws.jaxws.2.2.webcontainer_fat/publish/servers/PureCXFTestServer/bootstrap.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
bootstrap.include=../testports.properties | ||
bootstrap.include=../testports.properties | ||
com.ibm.ws.logging.trace.specification=org.apache.cxf.*=all=enabled |
3 changes: 2 additions & 1 deletion
3
....2.2.webcontainer_fat/publish/servers/ServerSideStubClientTestServer/bootstrap.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
bootstrap.include=../testports.properties | ||
bootstrap.include=../testports.properties | ||
com.ibm.ws.logging.trace.specification=org.apache.cxf.*=all=enabled |
3 changes: 2 additions & 1 deletion
3
....2.webcontainer_fat/publish/servers/WebEndpointAddressOverrideServer/bootstrap.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
bootstrap.include=../testports.properties | ||
bootstrap.include=../testports.properties | ||
com.ibm.ws.logging.trace.specification=org.apache.cxf.*=all=enabled |
3 changes: 2 additions & 1 deletion
3
...xws.2.2.webcontainer_fat/publish/servers/WebServiceContextTestServer/bootstrap.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
bootstrap.include=../testports.properties | ||
bootstrap.include=../testports.properties | ||
com.ibm.ws.logging.trace.specification=org.apache.cxf.*=all=enabled |
3 changes: 2 additions & 1 deletion
3
...xws.2.2.webcontainer_fat/publish/servers/WebServiceMonitorTestServer/bootstrap.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
bootstrap.include=../testports.properties | ||
bootstrap.include=../testports.properties | ||
com.ibm.ws.logging.trace.specification=org.apache.cxf.*=all=enabled |
3 changes: 2 additions & 1 deletion
3
...2.2.webcontainer_fat/publish/servers/WebServiceRefFeaturesTestServer/bootstrap.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
bootstrap.include=../testports.properties | ||
bootstrap.include=../testports.properties | ||
com.ibm.ws.logging.trace.specification=org.apache.cxf.*=all=enabled |
3 changes: 2 additions & 1 deletion
3
...s.jaxws.2.2.webcontainer_fat/publish/servers/WebServiceRefTestServer/bootstrap.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
bootstrap.include=../testports.properties | ||
bootstrap.include=../testports.properties | ||
com.ibm.ws.logging.trace.specification=org.apache.cxf.*=all=enabled:java.util.*=all |
1 change: 1 addition & 0 deletions
1
...ws.2.2.webcontainer_fat/publish/servers/com.ibm.ws.jaxws.virtualhost/bootstrap.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
websphere.java.security.exempt=true | ||
bootstrap.include=../testports.properties | ||
com.ibm.ws.logging.trace.specification=org.apache.cxf.*=all=enabled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
133 changes: 133 additions & 0 deletions
133
dev/com.ibm.ws.org.apache.cxf.cxf.core.3.2/src/io/openliberty/cxf/logging/CXFLogger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 IBM Corporation and others. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License 2.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*******************************************************************************/ | ||
package io.openliberty.cxf.logging; | ||
|
||
import java.util.logging.ConsoleHandler; | ||
import java.util.logging.Filter; | ||
import java.util.logging.Handler; | ||
import java.util.logging.LogManager; | ||
import java.util.logging.LogRecord; | ||
import java.util.logging.Logger; | ||
|
||
import com.ibm.websphere.ras.annotation.Trivial; | ||
import com.ibm.ws.logging.internal.WsLogger; | ||
|
||
/** | ||
* CXFLogger is inherited from the WsLogger class to preserve same behavior | ||
* except the one that we aimed to change. Which is to add class name to log records. | ||
* The whole design is aimed to support the addition of class name to the logRecord | ||
* in public void log(LogRecord logRecord) method in line logRecord.setSourceClassName(getClassName()); | ||
*/ | ||
public class CXFLogger extends WsLogger { | ||
|
||
private String className = ""; | ||
|
||
/** | ||
* @param name | ||
* @param resourceBundleName | ||
* @param c | ||
*/ | ||
public CXFLogger(String name, String resourceBundleName, Class<?> c) { | ||
super(name, c, resourceBundleName); | ||
setClassName(c.getCanonicalName()); | ||
} | ||
|
||
/** | ||
* @return the className | ||
*/ | ||
public String getClassName() { | ||
return this.className; | ||
} | ||
|
||
/** | ||
* @param className the className to set | ||
*/ | ||
public void setClassName(String clsName) { | ||
this.className = clsName; | ||
} | ||
|
||
/* | ||
* @see java.util.logging.Logger#log(java.util.logging.LogRecord) | ||
*/ | ||
@Trivial | ||
@Override | ||
public void log(LogRecord logRecord) { | ||
if (logRecord == null) { | ||
return; | ||
} | ||
// The whole point this task is to | ||
// add the class name to the logRecord | ||
logRecord.setSourceClassName(getClassName()); | ||
// super.log(logRecord); | ||
if (!isLoggable(logRecord.getLevel())) { | ||
System.out.println("#in CXFLogger return 1"); | ||
return; | ||
} | ||
Filter theFilter = getFilter();; | ||
if (theFilter != null && !theFilter.isLoggable(logRecord)) { | ||
System.out.println("#in CXFLogger return 2"); | ||
return; | ||
} | ||
|
||
// Post the LogRecord to all our Handlers, and then to | ||
// our parents' handlers, all the way up the tree. | ||
Logger logger = this; | ||
|
||
Logger.getGlobal().addHandler(new ConsoleHandler()); | ||
|
||
while (logger != null) { | ||
final Handler[] loggerHandlers = logger.getGlobal().getHandlers(); | ||
System.out.println("#in CXFLogger loggerHandlers: " + loggerHandlers); | ||
for (Handler handler : loggerHandlers) { | ||
handler.publish(logRecord); | ||
System.out.println("#in CXFLogger handler.publish(logRecord): " + handler); | ||
} | ||
|
||
final boolean useParentHdls = getUseParentHandlers(); | ||
|
||
if (!useParentHdls) { | ||
System.out.println("#in CXFLogger break"); | ||
break; | ||
} | ||
|
||
logger = logger.getParent(); | ||
} | ||
} | ||
|
||
/** | ||
* @param loggerName | ||
* @param bundleName | ||
* @param cls | ||
* @return | ||
*/ | ||
public static CXFLogger getLogger(String loggerName, String bundleName, Class<?> cls) { | ||
return new CXFLogger(loggerName, bundleName, cls); | ||
} | ||
|
||
/** | ||
* @param loggerName | ||
* @param cls | ||
* @return | ||
*/ | ||
public static CXFLogger getLogger(String loggerName, Class<?> cls) { | ||
return getLogger(loggerName, null, cls); | ||
} | ||
|
||
/** | ||
* @param logger | ||
* @param cls | ||
* @return | ||
*/ | ||
public static Logger getLogger(Logger logger, Class<?> cls) { | ||
return getLogger(logger.getName(), logger.getResourceBundleName(), cls); | ||
} | ||
|
||
|
||
} |
82 changes: 82 additions & 0 deletions
82
dev/com.ibm.ws.org.apache.cxf.cxf.core.3.2/src/org/apache/cxf/common/logging/CXFLogger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 IBM Corporation and others. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License 2.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*******************************************************************************/ | ||
package org.apache.cxf.common.logging; | ||
|
||
import java.util.logging.LogRecord; | ||
import com.ibm.ws.logging.internal.WsLogger; | ||
|
||
/** | ||
* CXFLogger is inherited from the WsLogger class to preserve same behavior | ||
* except the one that we aimed to change. Which is to add class name to log records | ||
*/ | ||
public class CXFLogger extends WsLogger { | ||
|
||
private String className = ""; | ||
|
||
/** | ||
* @param name | ||
* @param c | ||
* @param resourceBundleName | ||
*/ | ||
public CXFLogger(String name, String resourceBundleName, Class<?> c) { | ||
super(name, c, resourceBundleName); | ||
setClassName(c.getCanonicalName()); | ||
} | ||
|
||
/** | ||
* This method is not aimed to use since due to trace injection | ||
* it creates significant amount of excessive logs | ||
* this.className will be used instead | ||
* | ||
* @return the className | ||
*/ | ||
public String getClassName() { | ||
return this.className; | ||
} | ||
|
||
/** | ||
* @param className the className to set | ||
*/ | ||
public void setClassName(String clsName) { | ||
this.className = clsName; | ||
} | ||
|
||
/* | ||
* @see java.util.logging.Logger#log(java.util.logging.LogRecord) | ||
*/ | ||
@Override | ||
public void log(LogRecord logRecord) { | ||
if (logRecord == null) { | ||
return; | ||
} | ||
logRecord.setSourceClassName(getClassName()); | ||
super.log(logRecord); | ||
} | ||
|
||
/** | ||
* @param logger | ||
* @param cls | ||
* @return | ||
*/ | ||
public static CXFLogger getLogger(String loggerName, String bundleName, Class<?> cls) { | ||
CXFLogger logger = (CXFLogger) CXFLogger.getLogger(loggerName, bundleName); | ||
logger.setClassName(cls.getCanonicalName()); | ||
return logger; | ||
} | ||
|
||
/** | ||
* @param loggerName | ||
* @param cls | ||
* @return | ||
*/ | ||
public static CXFLogger getLogger(String loggerName, Class<?> cls) { | ||
return getLogger(loggerName, null, cls); | ||
} | ||
} |
Oops, something went wrong.