OracleJavaScript API Reference for Oracle ADF Faces

 

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

oracle.adf.view.js.logging
Class AdfClientFileLogWriter

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adf.view.js.logging.AdfLogWriter
               |
               +--oracle.adf.view.js.logging.AdfBufferedLogWriter
                     |
                     +--oracle.adf.view.js.logging.AdfClientFileLogWriter

public class AdfClientFileLogWriter
extends AdfBufferedLogWriter
A BufferedAdfLogWriter subclass that buffers the log output and sends any log output to a Java Applet to log to disk when the AdfLogWriter is flushed.



Field Summary

private Object
_backupLogWriter
private static Object
_BROWSER_VERSION
private Object
_document
private static Object
_END_TAG
private static Object
_PROFILER_VERSION
private Object
_sessionId
private static Object
_START_TAG
private Object
_window
private static Object
_XML_FILE_HEADER


Fields inherited from oracle.adf.view.js.base.AdfObject

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Constructor Summary

public
AdfClientFileLogWriter(Object domWindow, Object backupLogWriter)
A BufferedAdfLogWriter subclass that buffers the log output and sends any log output to a Java Applet to log to disk when the AdfLogWriter is flushed.


Method Summary

public Object
close()
Close the AdfLogWriter and free all associated resources.
public Object
closeRecord()
Logs log records to the AdfDiskWriterApplet, which in turn logs to disk.
private static Object
_createAppletTag()
Attaches the ClientFileWriter applet tag to the DOM.
public Object
flush()
Flush any buffered output.
protected Object
FormatLogRecord(Object logRecord)
Formats the logRecord
protected Object
FormatMessage(Object message)
Formats the message field of the AdfLogRecord
protected Object
FormatWhen(Object when)
Formats the when field of the AdfLogRecord
public Object
getApplet()
Returns the applet Writer object is present in the document.
protected Object
Init(Object domWindow, Object backupLogWriter)
Initializes the instance.
private Object
_logToBackupLogWriter(Object message)
Logs to the backup logger.
public Object
setSessionId(Object value)
Setter method for client sessionId


Methods inherited from oracle.adf.view.js.logging.AdfBufferedLogWriter

Clear, getLogRecords, PublishImpl


Methods inherited from oracle.adf.view.js.logging.AdfLogWriter

CheckIfClosed, FormatError, FormatLevel, getFilter, publish, setFilter


Methods inherited from oracle.adf.view.js.base.AdfObject

adopt, clone, createCallback, createInitializedObject, createSubclass, ensureClassInitialization, equals, getClass, GetLazyArrayProperty, GetLazyMapProperty, getTypeName, toDebugString, toString


Field Detail


_backupLogWriter

private Object _backupLogWriter

_BROWSER_VERSION

private static Object _BROWSER_VERSION

_document

private Object _document

_END_TAG

private static Object _END_TAG

_PROFILER_VERSION

private static Object _PROFILER_VERSION

_sessionId

private Object _sessionId

_START_TAG

private static Object _START_TAG

_window

private Object _window

_XML_FILE_HEADER

private static Object _XML_FILE_HEADER

Constructor Detail


AdfClientFileLogWriter

public AdfClientFileLogWriter(Object domWindow,
                              Object backupLogWriter)

A BufferedAdfLogWriter subclass that buffers the log output and sends any log output to a Java Applet to log to disk when the AdfLogWriter is flushed.

Parameters:
domWindow    
backupLogWriter    

Method Detail


close

public Object close()

Close the AdfLogWriter and free all associated resources.

The close method will perform a flush and then close the AdfLogWriter. After close has been called this AdfLogWriter should no longer be used. Method calls may either be silently ignored or may throw runtime exceptions.


Return:
Object
Overrides:
AdfLogWriter.close()

closeRecord

public Object closeRecord()

Logs log records to the AdfDiskWriterApplet, which in turn logs to disk. A sample log file: <log> <AdfRcProfiler version="3.0"/> <record> <header> <date>Wed, 28 Oct 2009 17:51:25 GMT</date> <sessionId>1256752279854</sessionId> <ecId>0000IISHUvlC^qlvwsBDD01Au8FC00001S</ecId> <page>ADF Faces Rich Client Demos</page> <serverHost>localhost:7001</serverHost> <path>/adf-richclient-demo-11-sherman-MLR-SNAPSHOT/faces/index.jspx</path> </header> <entry> <time>20:24:31.734</time> <message> <description>Initial page load done</description> <timestamp>1256934271734</timestamp> <timing>3656</timing> </message> </entry> ... </record> </log>

Return:
Object

_createAppletTag

private static Object _createAppletTag()

Attaches the ClientFileWriter applet tag to the DOM.

Return:
Object

flush

public Object flush()

Flush any buffered output.

Return:
Object
Overrides:
AdfLogWriter.flush()

FormatLogRecord

protected Object FormatLogRecord(Object logRecord)

Formats the logRecord

Parameters:
logRecord  -  AdfLogRecord to format
Return:
Object
Overrides:
AdfLogWriter.FormatLogRecord(AdfLogRecord)

FormatMessage

protected Object FormatMessage(Object message)

Formats the message field of the AdfLogRecord

Parameters:
message  -  MESSAGE_FIELD of the log record. Expected semicolon separated values in the form of string (description); int (timestamp); int (timing) Users can add custom tags and values as 3rd and higher elements of the message array eg. AdfLogger.getLogger("profiler").info(";;;<custom_tag>whatever_value</custom_tag>"); Initially wanted to make it comma separated but events strings have commas in them already eg. "AdfActionEvent [type=action, source=AdfRichCommandLink [oracle.adf.RichCommandLink] id=tmplt:abcCols:cols:0:secs:0:itms:0:cmd, phase=CAPTURING_PHASE]"
Return:
Object
Overrides:
AdfLogWriter.FormatMessage(Object)

FormatWhen

protected Object FormatWhen(Object when)

Formats the when field of the AdfLogRecord

Parameters:
when  -  timestamp string
Return:
Object
Overrides:
AdfLogWriter.FormatWhen(Object)

getApplet

public Object getApplet()

Returns the applet Writer object is present in the document. Otherwise returns "undefined".

Return:
Object

Init

protected Object Init(Object domWindow,
                      Object backupLogWriter)

Initializes the instance. Subclasses of AdfObject must call their superclass' Init

Parameters:
domWindow    
backupLogWriter    
Return:
Object
Overrides:
AdfObject.Init()

_logToBackupLogWriter

private Object _logToBackupLogWriter(Object message)

Logs to the backup logger.

Parameters:
message  -  string to log
Return:
Object

setSessionId

public Object setSessionId(Object value)

Setter method for client sessionId

Parameters:
value  -  String value of the sessionId.
Return:
Object

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

 

Generated on 2011.08.31 02:41 UTC
Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.