Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
srvpro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
srvpro
Commits
d024444c
Commit
d024444c
authored
Jun 13, 2016
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add log stderr
parent
e035c61b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
ygopro-server.coffee
ygopro-server.coffee
+6
-0
ygopro-server.js
ygopro-server.js
+9
-0
No files found.
ygopro-server.coffee
View file @
d024444c
...
@@ -416,6 +416,10 @@ class Room
...
@@ -416,6 +416,10 @@ class Room
log
.
info
"AI stderr: "
+
data
log
.
info
"AI stderr: "
+
data
return
return
return
return
@
process
.
stderr
.
on
'data'
,
(
data
)
=>
log
.
info
"YGOPRO stderr: "
+
data
@
has_ygopro_error
=
true
return
catch
catch
@
error
=
"建立房间失败,请重试"
@
error
=
"建立房间失败,请重试"
delete
:
->
delete
:
->
...
@@ -448,6 +452,8 @@ class Room
...
@@ -448,6 +452,8 @@ class Room
recorded_ip
.
push
player_ip
recorded_ip
.
push
player_ip
redisdb
.
lpush
(
player_ip
+
":replays"
,
replay_id
)
redisdb
.
lpush
(
player_ip
+
":replays"
,
replay_id
)
return
return
if
@
has_ygopro_error
log
.
info
"error replay: R#"
+
replay_id
return
return
@
watcher_buffers
=
[]
@
watcher_buffers
=
[]
@
recorder_buffers
=
[]
@
recorder_buffers
=
[]
...
...
ygopro-server.js
View file @
d024444c
...
@@ -556,6 +556,12 @@
...
@@ -556,6 +556,12 @@
}
}
};
};
})(
this
));
})(
this
));
this
.
process
.
stderr
.
on
(
'
data
'
,
(
function
(
_this
)
{
return
function
(
data
)
{
log
.
info
(
"
YGOPRO stderr:
"
+
data
);
_this
.
has_ygopro_error
=
true
;
};
})(
this
));
}
catch
(
error1
)
{
}
catch
(
error1
)
{
this
.
error
=
"
建立房间失败,请重试
"
;
this
.
error
=
"
建立房间失败,请重试
"
;
}
}
...
@@ -588,6 +594,9 @@
...
@@ -588,6 +594,9 @@
recorded_ip
.
push
(
player_ip
);
recorded_ip
.
push
(
player_ip
);
redisdb
.
lpush
(
player_ip
+
"
:replays
"
,
replay_id
);
redisdb
.
lpush
(
player_ip
+
"
:replays
"
,
replay_id
);
});
});
if
(
this
.
has_ygopro_error
)
{
log
.
info
(
"
error replay: R#
"
+
replay_id
);
}
});
});
}
}
this
.
watcher_buffers
=
[];
this
.
watcher_buffers
=
[];
...
...
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