Definitions for jquery.clientSideLogging #218

This commit is contained in:
Diullei Gomes
2013-01-26 19:44:41 -02:00
parent d43bec3268
commit 026932eeab
3 changed files with 49 additions and 0 deletions
@@ -0,0 +1,24 @@
///<reference path="jquery.clientSideLogging.d.ts" />
interface JQueryStatic {
info: (what?: any) => any;
error: (what?: any) => any;
log: (what?: any) => any;
clientSideLogging: (options: ClientSideLoggingObject) => any;
}
$.clientSideLogging({
log_level: 3,
client_info: {
location:true,
screen_size:true,
user_agent:true,
window_size:false
}
});
$.info({msg:$(this).parents('li').find('input:text').val()});
$.error({msg:$(this).parents('li').find('input:text').val()});
$.log($(this).parents('li').find('input:text').val());
$.post('/log?type=error&msg=YOUR_ERROR_MESSAGE');