OracleJavaScript API Reference for Oracle ADF Faces

 

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

oracle.adf.view.js.logging
Class AdfLogWriter

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adf.view.js.logging.AdfLogWriter
Direct Known Subclasses:
AdfBufferedLogWriter, AdfConsoleLogWriter, AdfFireBugLogWriter, AdfGeckoLogWriter, AdfIELogWriter, AdfOperaLogWriter, AdfSafariLogWriter, AdfStatusLogWriter

public abstract class AdfLogWriter
extends AdfObject
Abstract class defining contract for writing and formatting of AdfLogRecords from the AdfLogger



Field Summary

private Object
_closed
private Object
_filter


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

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Method Summary

protected Object
CheckIfClosed()
Checks if the AdfLogWriter is already closed and errors if it is
public Object
close()
Close the AdfLogWriter and free all associated resources.
public Object
flush()
Flush any buffered output.
protected Object
FormatError(Object error)
Formats the level field of the AdfLogRecord
protected Object
FormatLevel(Object level)
Formats the level field of the AdfLogRecord
protected String
FormatLogRecord(AdfLogRecord 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
getFilter()
Returns the current filter
protected Object
Init()
Initialize the AdfLogWriter
public Object
publish(Object record)
Publish a AdfLogRecord.
protected Object
PublishImpl(Object record)
Override hook point for AdfLogWriter subclasses that don't want to perform any filtering of their own
public Object
setFilter(Object newFilter)
Changes the logging filter to the new filter.


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

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


Field Detail


_closed

private Object _closed

_filter

private Object _filter

Method Detail


CheckIfClosed

protected Object CheckIfClosed()

Checks if the AdfLogWriter is already closed and errors if it is

Return:
Object

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

flush

public Object flush()

Flush any buffered output.

Return:
Object

FormatError

protected Object FormatError(Object error)

Formats the level field of the AdfLogRecord

Parameters:
error    
Return:
Object

FormatLevel

protected Object FormatLevel(Object level)

Formats the level field of the AdfLogRecord

Parameters:
level    
Return:
Object

FormatLogRecord

protected String FormatLogRecord(AdfLogRecord logRecord)

Formats the logRecord

Parameters:
logRecord  -  to format
Return:
String - Formatted string

FormatMessage

protected Object FormatMessage(Object message)

Formats the message field of the AdfLogRecord

Parameters:
message    
Return:
Object

FormatWhen

protected Object FormatWhen(Object when)

Formats the when field of the AdfLogRecord

Parameters:
when    
Return:
Object

getFilter

public Object getFilter()

Returns the current filter

Return:
Object

Init

protected Object Init()

Initialize the AdfLogWriter

Return:
Object
Overrides:
AdfObject.Init()

publish

public Object publish(Object record)

Publish a AdfLogRecord.

The logging request was made initially to a AdfLogger object, which initialized the AdfLogRecord and forwarded it here.

The AdfLogWriter is responsible for formatting the message, when and if necessary. The formatting should include localization.

Subclasses content to let the AdfLogWriter superclass execute the filter can override PublishImpl instead of publish


Parameters:
record  -  description of the log event
Return:
Object

PublishImpl

protected Object PublishImpl(Object record)

Override hook point for AdfLogWriter subclasses that don't want to perform any filtering of their own

Parameters:
record    
Return:
Object

setFilter

public Object setFilter(Object newFilter)

Changes the logging filter to the new filter. The filter is a function that takes a AdfLogRecord object and returns true if the AdfLogRecord should be logged.

Parameters:
newFilter    
Return:
Object

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

 

Generated on 2010.03.26 00:15 UTC
Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.