# TLog_Checkpoint

> This sample demonstrates the use of log option `MCO_TRANSLOG_SIZE_CLBK` that enables warning via user defined callback if the specified log file size has been reached.

> The sample application sets up the log file size limit and user defined callback that will signal whether the limit has been reached. The main application loop performs database transactions and if size callback has been called the main loop pauses then saves a database snapshot using the special function `mco_translog_db_save`. This function saves a database snapshot and transaction log truncation in a single thread safe operation.

### How to Run

> See instructions here on how to build this and other samples on your development platform. Once built, the sample can be run from the `\target\bin` directory:

>         tlogcheckpoint

> But it is more instructive to run it in your development environment debugger, stepping through the code.

Related Topics