Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ChayChan
KLog
提交
ad836a6a
K
KLog
项目概览
ChayChan
/
KLog
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
KLog
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
ad836a6a
编写于
11月 15, 2015
作者:
Z
ZhaoKaiQiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改Msg为Object
上级
e0d502a8
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
24 addition
and
5 deletion
+24
-5
.gitignore
.gitignore
+2
-0
app/app.iml
app/app.iml
+5
-2
app/build.gradle
app/build.gradle
+2
-1
app/src/main/java/com/socks/sample/MainActivity.java
app/src/main/java/com/socks/sample/MainActivity.java
+9
-0
app/src/main/res/layout/activity_main.xml
app/src/main/res/layout/activity_main.xml
+5
-0
library/src/main/java/com/socks/library/KLog.java
library/src/main/java/com/socks/library/KLog.java
+1
-2
未找到文件。
.gitignore
浏览文件 @
ad836a6a
...
...
@@ -7,6 +7,7 @@
*.dex
# Java class files
/library/library.iml
*.class
# Generated files
...
...
@@ -22,6 +23,7 @@ build/
local.properties
# Proguard folder generated by Eclipse
/app/app.iml
proguard/
# Log Files
...
...
app/app.iml
浏览文件 @
ad836a6a
...
...
@@ -66,15 +66,18 @@
<sourceFolder
url=
"file://$MODULE_DIR$/src/androidTest/rs"
isTestSource=
"true"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/assets"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/classes"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/debug"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/dependency-cache"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/dex"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.1.0/jars"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.0/jars"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/exploded-aar/com.github.zhaokaiqiang.klog/library/0.0.1/jars"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/incremental"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/manifests"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/pre-dexed"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/res"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/rs"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/symbols"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/tmp"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/outputs"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/tmp"
/>
</content>
...
...
@@ -82,7 +85,7 @@
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"library"
exported=
""
name=
"support-v4-23.1.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"appcompat-v7-23.1.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"library-0.0.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"support-annotations-23.1.0"
level=
"project"
/>
<orderEntry
type=
"module"
module-name=
"library"
exported=
""
/>
</component>
</module>
\ No newline at end of file
app/build.gradle
浏览文件 @
ad836a6a
...
...
@@ -29,5 +29,6 @@ android {
dependencies
{
compile
fileTree
(
include:
[
'*.jar'
],
dir:
'libs'
)
compile
'com.android.support:appcompat-v7:23.1.0'
compile
'com.github.zhaokaiqiang.klog:library:0.0.1'
// compile 'com.github.zhaokaiqiang.klog:library:0.0.1'
compile
project
(
':library'
)
}
app/src/main/java/com/socks/sample/MainActivity.java
浏览文件 @
ad836a6a
...
...
@@ -50,6 +50,15 @@ public class MainActivity extends AppCompatActivity {
KLog
.
a
(
TAG
,
LOG_MSG
);
}
public
void
logWithNull
(
View
view
){
KLog
.
v
(
null
);
KLog
.
d
(
null
);
KLog
.
i
(
null
);
KLog
.
w
(
null
);
KLog
.
e
(
null
);
KLog
.
a
(
null
);
}
public
void
logWithJson
(
View
view
)
{
KLog
.
json
(
JSON
);
}
...
...
app/src/main/res/layout/activity_main.xml
浏览文件 @
ad836a6a
...
...
@@ -33,4 +33,9 @@
android:layout_height=
"wrap_content"
android:onClick=
"logWithJsonTag"
android:text=
"Log(TAG,JSON)"
/>
<Button
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:onClick=
"logWithNull"
android:text=
"Log(NULL)"
/>
</LinearLayout>
library/src/main/java/com/socks/library/KLog.java
浏览文件 @
ad836a6a
...
...
@@ -140,8 +140,7 @@ public class KLog {
stringBuilder
.
append
(
"[ ("
).
append
(
className
).
append
(
":"
).
append
(
lineNumber
).
append
(
")#"
).
append
(
methodName
).
append
(
" ] "
);
if
(
objectMsg
==
null
)
{
Log
.
d
(
tag
,
"Null Msg Object"
);
return
;
msg
=
"Log with null Object"
;
}
else
{
msg
=
objectMsg
.
toString
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录