- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ICE4J logging to stdout and not using our loggers
Showing
8 changed files
with
238 additions
and
23 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
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
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
177 changes: 177 additions & 0 deletions
177
core/src/main/java/com/rtm516/mcxboxbroadcast/core/webrtc/IceLogger.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,177 @@ | ||
package com.rtm516.mcxboxbroadcast.core.webrtc; | ||
|
||
import com.rtm516.mcxboxbroadcast.core.Logger; | ||
|
||
import java.util.Map; | ||
import java.util.function.Supplier; | ||
import java.util.logging.Handler; | ||
import java.util.logging.Level; | ||
|
||
public class IceLogger implements org.jitsi.utils.logging2.Logger { | ||
private final Logger logger; | ||
|
||
public IceLogger(Logger logger) { | ||
this.logger = logger.prefixed("Ice4J"); | ||
} | ||
|
||
|
||
@Override | ||
public org.jitsi.utils.logging2.Logger createChildLogger(String name, Map<String, String> context) { | ||
return this; | ||
} | ||
|
||
@Override | ||
public org.jitsi.utils.logging2.Logger createChildLogger(String name) { | ||
return this; | ||
} | ||
|
||
@Override | ||
public void setUseParentHandlers(boolean useParentHandlers) { | ||
|
||
} | ||
|
||
@Override | ||
public void addHandler(Handler handler) throws SecurityException { | ||
|
||
} | ||
|
||
@Override | ||
public void removeHandler(Handler handler) throws SecurityException { | ||
|
||
} | ||
|
||
@Override | ||
public boolean isTraceEnabled() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public void trace(Object msg) { | ||
|
||
} | ||
|
||
@Override | ||
public void trace(Supplier<String> msgSupplier) { | ||
|
||
} | ||
|
||
@Override | ||
public boolean isDebugEnabled() { | ||
return true; // We handle this in the logger so just claim its always enabled | ||
} | ||
|
||
@Override | ||
public void debug(Object msg) { | ||
logger.debug(msg.toString()); | ||
} | ||
|
||
@Override | ||
public void debug(Supplier<String> msgSupplier) { | ||
logger.debug(msgSupplier.get()); | ||
} | ||
|
||
@Override | ||
public boolean isInfoEnabled() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public void info(Object msg) { | ||
logger.debug(msg.toString()); | ||
} | ||
|
||
@Override | ||
public void info(Supplier<String> msgSupplier) { | ||
logger.debug(msgSupplier.get()); | ||
} | ||
|
||
@Override | ||
public boolean isWarnEnabled() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public void warn(Object msg) { | ||
logger.debug(msg.toString()); | ||
} | ||
|
||
@Override | ||
public void warn(Supplier<String> msgSupplier) { | ||
logger.debug(msgSupplier.get()); | ||
} | ||
|
||
@Override | ||
public void warn(Object msg, Throwable t) { | ||
logger.debug(msg.toString() + "\n" + logger.getStackTrace(t)); | ||
} | ||
|
||
@Override | ||
public void error(Object msg) { | ||
logger.error(msg.toString()); | ||
} | ||
|
||
@Override | ||
public void error(Supplier<String> msgSupplier) { | ||
logger.error(msgSupplier.get()); | ||
} | ||
|
||
@Override | ||
public void error(Object msg, Throwable t) { | ||
logger.error(msg.toString(), t); | ||
} | ||
|
||
@Override | ||
public void setLevelError() { | ||
|
||
} | ||
|
||
@Override | ||
public void setLevelWarn() { | ||
|
||
} | ||
|
||
@Override | ||
public void setLevelInfo() { | ||
|
||
} | ||
|
||
@Override | ||
public void setLevelDebug() { | ||
|
||
} | ||
|
||
@Override | ||
public void setLevelTrace() { | ||
|
||
} | ||
|
||
@Override | ||
public void setLevelAll() { | ||
|
||
} | ||
|
||
@Override | ||
public void setLevelOff() { | ||
|
||
} | ||
|
||
@Override | ||
public void setLevel(Level level) { | ||
|
||
} | ||
|
||
@Override | ||
public Level getLevel() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public void addContext(Map<String, String> addedContext) { | ||
|
||
} | ||
|
||
@Override | ||
public void addContext(String key, String value) { | ||
|
||
} | ||
} |
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