添加日志打印

This commit is contained in:
huang 2017-03-26 11:39:09 +08:00
parent 6594440c0d
commit 1f36ec2636
2 changed files with 12 additions and 1 deletions

View File

@ -29,8 +29,10 @@ class GamesController < ApplicationController
@path = game_path
@file_open = true
@content = @repository.cat(@path, @rev)
logger.info("content result is ###############{@content}")
else
@entries = @repository.entries(@path, @rev)
logger.info("result is ###############{@entries.first.try(:path)}")
end
@latest_output = @game.latest_output.try(:out_put)
outputs = @game.outputs

View File

@ -34,7 +34,7 @@
<div class="tab-info-inner"><%= h @game.ready_knowledge.try(:html_safe) %></div>
</div>
<div id="tab_con_3" class="undis tab-info">
<div class="tab-info-inner" style="line-height: 1.9"><%= h @game.answer.html_safe %></div>
<div class="tab-info-inner" style="line-height: 1.9" id="myshixun_game_answer"><%= h @game.answer.html_safe %></div>
</div>
</div>
</div>
@ -47,6 +47,15 @@
</div>
</div>
<script type="text/javascript" language="javascript">
var editor = CodeMirror.fromTextArea(document.getElementById("myshixun_game_answer"), {
mode: {name: 'text/x-java',
version: 2,
singleLineStringErrors: false},
lineNumbers: true,
indentUnit: 2,
matchBrackets: true
});
var web_h = window.innerHeight;
$(document).ready(function(){
if($.browser.msie) {