Git Product home page Git Product logo

xlogging's Introduction

XLogging

XLogging is an enhanced network performance monitor SDK for Android.

Quick Start

Gradle:

compile 'com.hello2mao:xlogging:2.0.3'

Usage:

XLogging.install();

Or you can add a callback to get specific data:

XLogging.install(new XLoggingCallback() {
            @Override
            public void handle(TransactionData transactionData) {
                System.out.println(transactionData.getBytesSent());
            }
        });

Example log

I/XLogging: <<<<<<<<XLogging Begin<<<<<<<<
            host:             image.baidu.com
            ip:               112.80.248.122
            scheme:           https
            protocol:         HTTP/1.1
            port:             443
            pathAndQuery:     /channel/listjson?pn=0&rn=30&tag1=%E7%BE%8E%E5%A5%B3&tag2=%E5%85%A8%E9%83%A8&ftags=%E6%A0%A1%E8%8A%B1&ie=utf8
            requestMethod:    GET
            statusCode:       200
            bytesSent:        277 bytes
            bytesReceived:    10285 bytes
            tcpConnectTime:   6 ms
            sslHandshakeTime: 21 ms
            requestTime:      1 ms
            firstPackageTime: 55 ms
            responseTime:     68 ms
            socketReuse:      false
            =========XLogging End==========

License

Copyright (C) 2018 hello2mao.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

xlogging's People

Contributors

hello2mao avatar satyaming avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

xlogging's Issues

关于扩展参数添加

如果想在最终组装的对象中增加一些和每一个请求相关的扩展参数,要在哪里添加呢?
比如在发送的请求A时设置一个requestId,要如何设置,可以让最终的回调对象中(比如新增一个属性extras,一个map ,来放置扩展参数)包含这个requestId

Not work on Android P

When using this library on Android P
Will throw Error:

    Process: com.hello2mao.xlogging.sample, PID: 24472
    java.lang.IllegalAccessError: Illegal class access: 'com.hello2mao.xlogging.internal.ssl.MonitoredSSLSocketFactory' attempting to access 'com.android.org.conscrypt.SSLParametersImpl' (declaration of 'com.hello2mao.xlogging.internal.ssl.MonitoredSSLSocketFactory' appears in /data/app/com.hello2mao.xlogging.sample-G6jifrwGvPzfnBKaSCzP9g==/split_lib_slice_6_apk.apk)
        at com.hello2mao.xlogging.internal.ssl.MonitoredSSLSocketFactory.getParameters(MonitoredSSLSocketFactory.java:30)
        at com.hello2mao.xlogging.internal.ssl.MonitoredSSLSocketFactory.<init>(MonitoredSSLSocketFactory.java:23)
        at com.hello2mao.xlogging.internal.ssl.Ssl.install(Ssl.java:21)
        at com.hello2mao.xlogging.XLogging.install(XLogging.java:49)
        at com.hello2mao.xlogging.sample.MainActivity.onClick(MainActivity.java:76)
        at com.hello2mao.xlogging.sample.MainActivity_ViewBinding$2.doClick(MainActivity_ViewBinding.java:49)
        at butterknife.internal.DebouncingOnClickListener.onClick(DebouncingOnClickListener.java:22)
        at android.view.View.performClick(View.java:6597)
        at android.view.View.performClickInternal(View.java:6574)
        at android.view.View.access$3100(View.java:778)
        at android.view.View$PerformClick.run(View.java:25885)
        at android.os.Handler.handleCallback(Handler.java:873)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6669)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

抓不到 DNS的信息啊

代码下载下俩,测试了下。

抓不到DNS的信息

而且 初始化方法 也 gen readme 不一样。

App

Hi, 我想请问一下,能否将其当作一个库添加进程序中,实现对Android手机里的其他app的监控呢?

讲讲原理呗

代码注释也来点,小白看不懂,或者加个好友,沟通一下

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.