pub fn basic_copper_setup(
unifiedlogger_output_base_name: &Path,
slab_size: Option<usize>,
_text_log: bool,
clock: Option<RobotClock>,
) -> CuResult<CopperContext>
Expand description
This is a basic setup for a copper application to get you started. Duplicate and customize as needed when your needs grow.
unifiedlogger_output_base_name: The base name of the log file. The logger will create a set of files based on this name for example if named “toto.copper” it will create toto_0.copper, toto_1.copper etc.
text_log: if true, the log will be printed to the console as a simple log. It is useful to debug an application in real-time but should be set to false in production as it is an order of magnitude slower than the default copper structured logging. It will create a LoggerRuntime that can be used as a robot clock source too.
slab_size: The logger will pre-allocate large files of those sizes. With the name of the given file _0, _1 etc. clock: if you let it to None it will create a default clock otherwise you can provide your own, for example a simulation clock. with let (clock , mock) = RobotClock::mock();