Skip to content

Logboy是一个日志管理库,可以本地控制台输出日志亦可远程输出

Notifications You must be signed in to change notification settings

wei-spring/LogBoy

Repository files navigation

Logboy

Logo

关于:

Logboy是一个日志管理库,可以本地控制台输出日志亦可远程输出, 通过搭建本地的Python环境,可以在本地浏览器查看输出的日志.

使用:

  1. 首先本地搭建python环境,这里使用时轻量级的web.py作为本地的服务器:
  1. Android项目使用:
compile 'me.chunsheng.logboy:logboy:1.0.2'

在Application或者Activity的OnCreate方法初始化:

//初始化如下:输入自己的IP+port
LogBoy.setRemoteUrl("http://192.168.1.108:8080/");
LogBoy.init(this);

//输出日志,和系统使用方法一样,分Tag ,Msg 以及日志级别(DEBUG|INFO|WARNING|ERROR)
LogBoy.d("TagBoyD::", i + "Man cannot discover new oceans unless he has courage to lose sight of the shore. —Gide");
LogBoy.w("TagBoyW::", i + "Towering genius disdains a beaten path. It seeks regions hitherto unexplored. —Lincoln ");
LogBoy.e("TagBoyE:", i + "Tomorrow is never clear. Our time is here.");

有图有真相

下面截图包含demo运行和本地浏览器两部分:

  1. 工程demo运行效果图:

远程服务器运行效果图:

License

LogBoy is made available under the Apache-2.0

About

Logboy是一个日志管理库,可以本地控制台输出日志亦可远程输出

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published