Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#noissue] Remove deprecated PLogger API #11725

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ private void addTraceExecutor(final String className) {
}

public static class ExecutorExecuteTransformCallback implements TransformCallback {
// private final PLogger logger = PLoggerFactory.getLogger(getClass());

@Override
public byte[] doInTransform(Instrumentor instrumentor, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@


public class CommandInterceptor extends AsyncContextSpanEventSimpleAroundInterceptor {
// private final PLogger logger = PLoggerFactory.getLogger(this.getClass());

public CommandInterceptor(TraceContext traceContext, MethodDescriptor methodDescriptor) {
super(traceContext, methodDescriptor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package com.navercorp.pinpoint.profiler.logging;

import com.navercorp.pinpoint.bootstrap.logging.PLogger;
import com.navercorp.pinpoint.bootstrap.logging.PluginLogger;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.Marker;

Expand All @@ -25,8 +25,7 @@
/**
* @author emeroad
*/
@SuppressWarnings("deprecation")
public class Log4J2PluginLoggerAdapter extends AbstractLoggerAdapter implements PLogger {
public class Log4J2PluginLoggerAdapter extends AbstractLoggerAdapter implements PluginLogger {

private final Logger logger;
private final boolean isDebug;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void start() {
logger.info("LoggerContextFactory:{} LoggerContext:{}", LogManager.getFactory().getClass().getName(), loggerContext.getClass().getName());

this.binder = new Log4j2Binder(loggerContext);
bindPLoggerFactory(this.binder);
bindPluginLogFactory(this.binder);

this.setupGrpcLogger(loggerContext);
}
Expand Down Expand Up @@ -84,8 +84,7 @@ private void setupGrpcLogger(LoggerContext loggerContext) {


private Logger getLoggerContextLogger() {
Logger logger = loggerContext.getLogger(getClass().getName());
return logger;
return loggerContext.getLogger(getClass().getName());
}


Expand Down Expand Up @@ -155,11 +154,11 @@ private void rollback(String key, String backup) {
}


private void bindPLoggerFactory(PluginLoggerBinder binder) {
private void bindPluginLogFactory(PluginLoggerBinder binder) {
final String binderClassName = binder.getClass().getName();
PluginLogger pluginLogger = binder.getLogger(binder.getClass().getName());
pluginLogger.info("PLoggerFactory.initialize() bind:{} cl:{}", binderClassName, binder.getClass().getClassLoader());
// Set binder to static LoggerFactory
pluginLogger.info("PluginLogManager.initialize() bind:{} cl:{}", binderClassName, binder.getClass().getClassLoader());
// Set binder to static PluginLogManager
// Should we unset binder at shutdown hook or stop()?
PluginLogManager.initialize(binder);
}
Expand Down