-
-
Notifications
You must be signed in to change notification settings - Fork 172
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
Strictmode using syslog #14
Comments
It looks like the I/System.out( 2859): 18:07:18,030 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@0:0 - RuntimeException in Action for tag [appender] android.os.NetworkOnMainThreadException I/System.out( 2859): at android.os.NetworkOnMainThreadException I/System.out( 2859): at at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1117) I/System.out( 2859): at at java.net.InetAddress.lookupHostByName(InetAddress.java:385) I/System.out( 2859): at at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236) I/System.out( 2859): at at java.net.InetAddress.getByName(InetAddress.java:289) I/System.out( 2859): at at ch.qos.logback.core.net.SyslogOutputStream.(Unknown Source) I/System.out( 2859): at at ch.qos.logback.core.net.SyslogAppenderBase.start(Unknown Source) I/System.out( 2859): at at ch.qos.logback.classic.net.SyslogAppender.start(Unknown Source) I/System.out( 2859): at at ch.qos.logback.core.joran.action.AppenderAction.end(Unknown Source) I/System.out( 2859): at at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Unknown Source) I/System.out( 2859): at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Unknown Source) I/System.out( 2859): at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Unknown Source) I/System.out( 2859): at at ch.qos.logback.core.joran.spi.EventPlayer.play(Unknown Source) I/System.out( 2859): at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(Unknown Source) I/System.out( 2859): at at ch.qos.logback.classic.util.ContextInitializer.configureByManifest(Unknown Source) I/System.out( 2859): at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(Unknown Source) I/System.out( 2859): at at org.slf4j.impl.StaticLoggerBinder.init(Unknown Source) I/System.out( 2859): at at org.slf4j.impl.StaticLoggerBinder.(Unknown Source) I/System.out( 2859): at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:128) I/System.out( 2859): at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:108) I/System.out( 2859): at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:279) I/System.out( 2859): at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:252) I/System.out( 2859): at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:265) I/System.out( 2859): at at com.example.helloandroid.ItemListActivity.(ItemListActivity.java:16) I/System.out( 2859): at at java.lang.Class.newInstanceImpl(Native Method) I/System.out( 2859): at at java.lang.Class.newInstance(Class.java:1319) I/System.out( 2859): at at android.app.Instrumentation.newActivity(Instrumentation.java:1053) I/System.out( 2859): at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1974) I/System.out( 2859): at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084) I/System.out( 2859): at at android.app.ActivityThread.access$600(ActivityThread.java:130) I/System.out( 2859): at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195) I/System.out( 2859): at at android.os.Handler.dispatchMessage(Handler.java:99) I/System.out( 2859): at at android.os.Looper.loop(Looper.java:137) I/System.out( 2859): at at android.app.ActivityThread.main(ActivityThread.java:4745) I/System.out( 2859): at at java.lang.reflect.Method.invokeNative(Native Method) I/System.out( 2859): at at java.lang.reflect.Method.invoke(Method.java:511) I/System.out( 2859): at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) I/System.out( 2859): at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) I/System.out( 2859): at at dalvik.system.NativeStart.main(Native Method) |
Can this be fixed? Thanks |
Please test this snapshot of logback-android-1.0.6-2. Thanks. |
Hi, I double checked my test and looks like I do not get the Network exception as you do. The server does show the log mesg so the syslog did push the log mesg to server. StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
config file (space added around >< as the comments is not showing properly. < configuration debug="true" > |
Hi, In the snapshot the syslog does not work. Went back to the last released jar and it works fine on it. |
Ok, thanks for testing. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Does syslog work ok with strict mode. I got this mesg when creating the logger. But no mesg when the mesg is send.
Not done extensive testing so asking if someone has experience with it.
Thanks
D/StrictMode( 3942): at com.syslog.logback.SyslogLogbackActivity.onCreate(SyslogLogbackActivity.java:26)
D/StrictMode( 3942): at com.syslog.logback.SyslogLogbackActivity.onCreate(SyslogLogbackActivity.java:26)
D/StrictMode( 3942): at com.syslog.logback.SyslogLogbackActivity.onCreate(SyslogLogbackActivity.java:26)
D/StrictMode( 3942): at com.syslog.logback.SyslogLogbackActivity.onCreate(SyslogLogbackActivity.java:26)
D/StrictMode( 3942): at com.syslog.logback.SyslogLogbackActivity.onCreate(SyslogLogbackActivity.java:26)
D/StrictMode( 3942): at com.syslog.logback.SyslogLogbackActivity.onCreate(SyslogLogbackActivity.java:26)
D/StrictMode( 3942): at com.syslog.logback.SyslogLogbackActivity.onCreate(SyslogLogbackActivity.java:26)
D/StrictMode( 3942): at com.syslog.logback.SyslogLogbackActivity.onCreate(SyslogLogbackActivity.java:26)
D/StrictMode( 3942): at com.syslog.logback.SyslogLogbackActivity.onCreate(SyslogLogbackActivity.java:26)
The text was updated successfully, but these errors were encountered: