Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
huangzhicong
/
SmartCanteen
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
331d1adc
authored
Jan 06, 2020
by
pye52
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
现在日志可以输出异常堆栈信息了
parent
18a50767
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
app/src/main/java/com/bgycc/smartcanteen/server/websocket/MainWebSocket.java
+1
-2
app/src/main/java/com/bgycc/smartcanteen/util/LogUtil.java
+20
-0
No files found.
app/src/main/java/com/bgycc/smartcanteen/server/websocket/MainWebSocket.java
View file @
331d1adc
...
...
@@ -256,8 +256,7 @@ public class MainWebSocket extends WebSocketClient {
@Override
public
void
onError
(
Exception
ex
)
{
LogUtil
.
i
(
TAG
,
"onError"
);
ex
.
printStackTrace
();
LogUtil
.
i
(
TAG
,
"onError"
,
ex
);
}
public
static
class
Request
{
...
...
app/src/main/java/com/bgycc/smartcanteen/util/LogUtil.java
View file @
331d1adc
...
...
@@ -12,21 +12,41 @@ public class LogUtil {
sEnable
=
enable
;
}
public
static
void
i
(
String
tag
,
String
log
,
Exception
e
)
{
if
(!
sEnable
)
return
;
Log
.
i
(
tag
,
log
,
e
);
}
public
static
void
i
(
String
tag
,
String
log
)
{
if
(!
sEnable
)
return
;
Log
.
i
(
tag
,
log
);
}
public
static
void
d
(
String
tag
,
String
log
,
Exception
e
)
{
if
(!
sEnable
)
return
;
Log
.
d
(
tag
,
log
,
e
);
}
public
static
void
d
(
String
tag
,
String
log
)
{
if
(!
sEnable
)
return
;
Log
.
d
(
tag
,
log
);
}
public
static
void
w
(
String
tag
,
String
log
,
Exception
e
)
{
if
(!
sEnable
)
return
;
Log
.
w
(
tag
,
log
,
e
);
}
public
static
void
w
(
String
tag
,
String
log
)
{
if
(!
sEnable
)
return
;
Log
.
w
(
tag
,
log
);
}
public
static
void
e
(
String
tag
,
String
log
,
Exception
e
)
{
if
(!
sEnable
)
return
;
Log
.
e
(
tag
,
log
,
e
);
}
public
static
void
e
(
String
tag
,
String
log
)
{
if
(!
sEnable
)
return
;
Log
.
e
(
tag
,
log
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment