[
https://issues.apache.org/jira/browse/LOG4J2-1921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16076119#comment-16076119
]
Ajitha edited comment on LOG4J2-1921 at 7/6/17 7:52 AM:
--------------------------------------------------------
Yes it is exactly 460 rather than 461...
https://issues.apache.org/jira/browse/LOG4J2-460.
I am running a problem because of which this ticket is open:
>In Android, we refer repositories directly from maven.
>https://mvnrepository.com/artifact/org.apache.logging.log4j
>The issue "https://issues.apache.org/jira/browse/LOG4J2-1920" was fixed in
>2.8.3 and not yet deployed in maven. I took 2.8.3 from apache snapshot. But
>when I take from Apache snapshot, it is not properly linked with Android.
>Because of that I suspect this issue to occur.
So, if you deploy the fix for "LOG4J2-1920" in maven repository, I would be
able to retest and close this issue. :( I am helpless.
was (Author: ajitha):
Yes it is exactly https://issues.apache.org/jira/browse/LOG4J2-460.
I am running a problem because of which this ticket is open:
>In Android, we refer repositories directly from maven.
>https://mvnrepository.com/artifact/org.apache.logging.log4j
>The issue "https://issues.apache.org/jira/browse/LOG4J2-1920" was fixed in
>2.8.3 and not yet deployed in maven. I took 2.8.3 from apache snapshot. But
>when I take from Apache snapshot, it is not properly linked with Android.
>Because of that I suspect this issue to occur.
So, if you deploy the fix for "LOG4J2-1920" in maven repository, I would be
able to retest and close this issue. :( I am helpless.
> Getting ClassCastException while getting LoggerContext
> ------------------------------------------------------
>
> Key: LOG4J2-1921
> URL: https://issues.apache.org/jira/browse/LOG4J2-1921
> Project: Log4j 2
> Issue Type: Bug
> Components: Configurators
> Affects Versions: 2.8.2
> Environment: Android
> Reporter: Ajitha
> Priority: Blocker
> Labels: Android
>
> Hi,
> I integrated the log4j with my Android application and did the initial
> config. It works fine. I have a menu item in "Settings" screen where I can
> change the log levels in my application. So, After I change the
> configuration, I need to update the loggers. So I am using following logic.
> {code:java}
> LoggerContext ctx = LoggerContext.getContext()
> Configuration config = ctx.getConfiguration();
> LoggerConfig loggerConfig =
> config.getLoggerConfig(LogManager.ROOT_LOGGER_NAME);
> loggerConfig.setLevel(myLogLevel);
> ctx.updateLoggers();
> {code}
> While getting the logger context, I am getting a ClassCastException.
> 05-26 22:33:21.011 E/AndroidRuntime( 9642): Caused by:
> java.lang.ClassCastException:
> org.apache.logging.log4j.simple.SimpleLoggerContext cannot be cast to
> org.apache.logging.log4j.core.LoggerContext
> 05-26 22:33:21.011 E/AndroidRuntime( 9642): at
> org.apache.logging.log4j.core.LoggerContext.getContext(LoggerContext.java:190)
> 05-26 22:33:21.011 E/AndroidRuntime( 9642): at
> org.apache.logging.log4j.core.config.Configurator.setRootLevel(Configurator.java:323)
> Please help here.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)