Class: OpenWFE::FileHistory
- Inherits:
-
BaseHistory
- Object
- BaseHistory
- OpenWFE::FileHistory
- Defined in:
- lib/openwfe/expool/history.rb
Overview
Simply dumps the history in the work directory in a file named “history.log” Warning : no fancy rotation or compression implemented here.
Instance Attribute Summary
Attributes inherited from BaseHistory
Attributes included from ServiceMixin
Attributes included from Contextual
Instance Method Summary collapse
-
#initialize(service_name, application_context) ⇒ FileHistory
constructor
A new instance of FileHistory.
-
#output_file ⇒ Object
Returns a handle on the output file instance used by this FileHistory.
- #stop ⇒ Object
Methods inherited from BaseHistory
Methods included from HistoryMixin
Methods included from ServiceMixin
Methods included from Contextual
#get_work_directory, #init_service, #lookup
Methods included from Logging
#ldebug, #ldebug_callstack, #lerror, #lfatal, #linfo, #llog, #lunknown, #lwarn
Methods included from OwfeServiceLocator
#get_engine, #get_error_journal, #get_expool, #get_expression_map, #get_expression_pool, #get_expression_storage, #get_expression_storages, #get_journal, #get_participant_map, #get_scheduler, #get_wfid_generator
Constructor Details
#initialize(service_name, application_context) ⇒ FileHistory
Returns a new instance of FileHistory.
150 151 152 153 154 155 156 157 158 |
# File 'lib/openwfe/expool/history.rb', line 150 def initialize (service_name, application_context) super @output = get_work_directory + "/history.log" @output = File.open(@output, "w+") linfo { "new() outputting history to #{@output.path}" } end |
Instance Method Details
#output_file ⇒ Object
Returns a handle on the output file instance used by this FileHistory.
164 165 166 |
# File 'lib/openwfe/expool/history.rb', line 164 def output_file @output end |
#stop ⇒ Object
168 169 170 |
# File 'lib/openwfe/expool/history.rb', line 168 def stop @output.close end |