Logger#
- class pams.logs.Logger[ソース]#
Logger class.
Logger is designed to handling parallelized market simulations. In the parallelized simulation, the order that logs are pushed to this logger is not deterministic
because of varied computational time.
- For example, there are 2 markets, market 1 and market 2, and those markets are run in parallel,
the computational time of one step for each market are not fixed.
Therefore, the logging sequence of market 1 and market 2 is not always the same. For handling this problem, logger should save the logs from those markets and the end of each step,
the logs are processed and written.
However, for some implementation, non-blocking log writing should be also supported. Therefore, this logger has 2 methods to handling logs --
write()
andwrite_and_direct_process()
- bulk_write(logs)[ソース]#
set some logs to pending list.
- パラメータ:
logs (List[
pams.logs.Log
]) -- log list.- 戻り値の型:
None
- 戻り値:
None
- bulk_write_and_direct_process(logs)[ソース]#
direct writing some logs.
- パラメータ:
logs (List[
pams.logs.Log
]) -- log list.- 戻り値の型:
None
- 戻り値:
None
- process(logs)[ソース]#
logging execution. For each log type, each processing method are implemented.
For usual implementation, please use
However, if you want to control the log writing sequence, you can change this implementation.
- パラメータ:
logs (List[
pams.logs.Log
]) -- log list.- 戻り値の型:
None
- 戻り値:
None
- process_cancel_log(log)[ソース]#
process cancel log. Called from
process()
.- パラメータ:
log (
pams.logs.CancelLog
]) -- cancel log- 戻り値の型:
None
- 戻り値:
None
- process_execution_log(log)[ソース]#
process execution log. Called from
process()
.- パラメータ:
log (
pams.logs.ExecutionLog
]) -- execution log- 戻り値の型:
None
- 戻り値:
None
- process_expiration_log(log)[ソース]#
process expiration log. Called from
process()
.- パラメータ:
log (
pams.logs.ExpirationLog
]) -- expiration log- 戻り値の型:
None
- 戻り値:
None
- process_market_step_begin_log(log)[ソース]#
process market step begin log. Called from
process()
.- パラメータ:
log (
pams.logs.MarketStepBeginLog
]) -- market step begin log- 戻り値の型:
None
- 戻り値:
None
- process_market_step_end_log(log)[ソース]#
process market step end log. Called from
process()
.- パラメータ:
log (
pams.logs.MarketStepEndLog
]) -- market step end log- 戻り値の型:
None
- 戻り値:
None
- process_order_log(log)[ソース]#
process order log. Called from
process()
.- パラメータ:
log (
pams.logs.OrderLog
]) -- order log- 戻り値の型:
None
- 戻り値:
None
- process_session_begin_log(log)[ソース]#
process session begin log. Called from
process()
.- パラメータ:
log (
pams.logs.SessionBeginLog
]) -- session begin log- 戻り値の型:
None
- 戻り値:
None
- process_session_end_log(log)[ソース]#
process session end log. Called from
process()
.- パラメータ:
log (
pams.logs.SessionEndLog
]) -- session end log- 戻り値の型:
None
- 戻り値:
None
- process_simulation_begin_log(log)[ソース]#
process simulation begin log. Called from
process()
.- パラメータ:
log (
pams.logs.SimulationBeginLog
]) -- simulation begin log- 戻り値の型:
None
- 戻り値:
None
- process_simulation_end_log(log)[ソース]#
process simulation end log. Called from
process()
.- パラメータ:
log (
pams.logs.SimulationEndLog
]) -- simulation end log- 戻り値の型:
None
- 戻り値:
None
- write(log)[ソース]#
set a log to pending list.
- パラメータ:
log (
pams.logs.Log
) -- log.- 戻り値の型:
None
- 戻り値:
None
- write_and_direct_process(log)[ソース]#
direct writing a log.
- パラメータ:
log (
pams.logs.Log
) -- log.- 戻り値の型:
None
- 戻り値:
None