| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- logger_parameter = {};
- function logger_init() {
- $('#result').html('');
- $('#content').html('');
- var str = '<table border="1" width="100%">';
- str += '<tr><td colspan="2"><a href="#" id="get">get</a> <a href="#" id="trace">trace</a> <a href="#" id="debug">debug</a> <a href="#" id="info">info</a> <a href="#" id="warn">warn</a></td></tr>';
- str += '<tr><td>debug:</td><td id="level"> </td></tr>';
- str += '</table>';
- $('#content').html(str);
- $('#get').click(function() {
- logger_get();
- });
- $('#trace').click(function() {
- logger_trace();
- });
- $('#debug').click(function() {
- logger_debug();
- });
- $('#info').click(function() {
- logger_info();
- });
- $('#warn').click(function() {
- logger_warn();
- });
- }
- function logger_get() {
- $.ajax({
- type : 'get',
- dataType : 'json',
- url : '../jaxrs/logger',
- contentType : 'application/json; charset=utf-8',
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).done(function(json) {
- if (json.type == 'success') {
- $('#level').html(json.data.value);
- }
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function debug_trace() {
- $.ajax({
- type : 'get',
- dataType : 'json',
- url : '../jaxrs/logger/trace',
- contentType : 'application/json; charset=utf-8',
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function debug_debug() {
- $.ajax({
- type : 'get',
- dataType : 'json',
- url : '../jaxrs/logger/debug',
- contentType : 'application/json; charset=utf-8',
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function debug_info() {
- $.ajax({
- type : 'get',
- dataType : 'json',
- url : '../jaxrs/logger/info',
- contentType : 'application/json; charset=utf-8',
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
- function debug_warn() {
- $.ajax({
- type : 'get',
- dataType : 'json',
- url : '../jaxrs/logger/warn',
- contentType : 'application/json; charset=utf-8',
- xhrFields : {
- 'withCredentials' : true
- },
- crossDomain : true
- }).always(function(json) {
- $('#result').html(JSON.stringify(json, null, 4));
- });
- }
|