Class RedirectableFileLogger
- All Implemented Interfaces:
Configurable,LineLogger,gda.observable.IObserver
ObservablePathProvider. When
the file location changes, a note will left in the last file directing a reader to the new file, and a note will be
made in the new file indicating where the log came from.
This might be used for example to create a server-side logger that mirrors everything from a Jython terminal window to a log file in the current visit directory. This should typically be done in Spring by wiring into a server's JythonServerFacade and command-server through adaptors. For example, given that a JythonServer has been made (always named 'command_server'), try this to get a JythonServerFacade reference:
and then the following to build up a typical logger:
where the terminallog_path_provider bean might be a dummy:
or a one that tracks the server's visit metadata:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.getFile()voidvoidMethods inherited from class gda.factory.ConfigurableBase
isConfigureAtStartup, isConfigured, reconfigure, setConfigured
-
Constructor Details
-
RedirectableFileLogger
-
-
Method Details
-
configure
public void configure()Description copied from class:ConfigurableBaseDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classConfigurableBase
-
getFile
-
log
- Specified by:
login interfaceLineLogger
-
update
- Specified by:
updatein interfacegda.observable.IObserver
-