Class CeL.code.log
log function
Defined in: log.origin.js.
Constructor Attributes | Constructor Name and Description |
---|---|
CeL.code.log(obj, className_set)
initial a log tool's instance/object
|
Field Attributes | Field Name and Description |
---|---|
沒有內容時自動隱藏
|
|
自動捲動
|
|
log 時 warning/error message 之 className
|
|
清除全部訊息 clear message
|
|
clear log board
|
|
在 log 結束時執行,相當於 VB 中 DoEvent() 或 。
|
|
log function (no delay)
|
|
deal with error message
|
|
當執行寫檔案或任何錯誤發生時之錯誤訊息。
while error occurred. |
|
auto save log.
|
|
獲取當前 buffer 中的 log
|
|
等待多久才顯示 log。若為 0 則直接顯示。
(WScript 沒有 setTimeout) |
|
class instance 預設作 log 之 function
|
|
在 save log 時的 encoding
|
|
save log to this file path
|
|
log 時使用之 tagName, 可用 div / span 等。若不設定會用 document.createTextNode
|
|
log 時 warning/error message 之 prefix
|
|
save message
|
|
在 save log 時 add date
|
|
超過這長度才 save。<=0 表示 autoflash,非數字則不紀錄。
|
|
boolean or function(message, log level) return save or not
|
|
在 save log 時的換行
|
|
設定寫入到哪
set log board for each instance (document object) |
|
show/hide log board
|
|
log a warning
|
Method Attributes | Method Name and Description |
---|---|
<private> <static> |
CeL.code.log.do_log(id)
do the log action
|
<static> |
CeL.code.log.get_error_message(e, new_line, caller)
對各種不同 error object 作應對,獲得可理解的 error message。
|
<static> |
CeL.code.log.node_description(node, flag)
get node description
|
Class Detail
CeL.code.log(obj, className_set)
initial a log tool's instance/object
- Parameters:
- {String|object HTMLElement} obj
- log target: message area element or id
- {Object} className_set Optional
- class name set
- Since:
- 2008/8/20 23:9:48
- Requires:
- gDate(),NewLine,fso
- See:
- usage: CeL.code.log.extend
Field Detail
{Boolean}
auto_hide
沒有內容時自動隱藏
- Deprecated:
- TODO
{Boolean}
auto_scroll
自動捲動
className_set
log 時 warning/error message 之 className
clear
清除全部訊息 clear message
clear_board
clear log board
do_event
在 log 結束時執行,相當於 VB 中 DoEvent() 或 。
do_log
log function (no delay)
err
deal with error message
error_message
當執行寫檔案或任何錯誤發生時之錯誤訊息。
while error occurred.. should read only
while error occurred.. should read only
{Boolean}
flush
auto save log. 若未設定,記得在 onunload 時 .save()
get_log
獲取當前 buffer 中的 log
interval
等待多久才顯示 log。若為 0 則直接顯示。
(WScript 沒有 setTimeout)
(WScript 沒有 setTimeout)
log
class instance 預設作 log 之 function
log_encoding
在 save log 時的 encoding
{Boolean}
log_file
save log to this file path
log_tag
log 時使用之 tagName, 可用 div / span 等。若不設定會用 document.createTextNode
message_prefix
log 時 warning/error message 之 prefix
save
save message
{Boolean}
save_date
在 save log 時 add date
{Number}
save_limit
超過這長度才 save。<=0 表示 autoflash,非數字則不紀錄。
{Boolean}
save_log
boolean or function(message, log level) return save or not
{string}
save_new_line
在 save log 時的換行
set_board
設定寫入到哪
set log board for each instance (document object)
set log board for each instance (document object)
toggle
show/hide log board
warn
log a warning
Method Detail
<private> <static>
CeL.code.log.do_log(id)
do the log action
- Parameters:
- id
<static>
CeL.code.log.get_error_message(e, new_line, caller)
對各種不同 error object 作應對,獲得可理解的 error message。
- Parameters:
- e
- error object
- new_line
- new_line
- caller
- function caller
- See:
- http://msdn.microsoft.com/en-us/library/ms976144.aspx The facility code establishes who originated the error. For example, all internal script engine errors generated by the JScript engine have a facility code of "A". http://msdn.microsoft.com/en-us/library/ms690088(VS.85).aspx http://msdn.microsoft.com/en-us/library/t9zk6eay.aspx http://msdn.microsoft.com/en-us/library/microsoft.jscript.errorobject.aspx Specifies the name of the type of the error. Possible values include Error, EvalError, RangeError, ReferenceError, SyntaxError, TypeError, and URIError.
<static>
CeL.code.log.node_description(node, flag)
get node description
- Parameters:
- node
- HTML node
- flag