]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/log/example/rotating_file/main.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / log / example / rotating_file / main.cpp
index d2144c8124a4041aa41c3c8e71e809e1c6bf655e..bb221f6eb35310b63628ece6502ba4b3708828b4 100644 (file)
@@ -48,16 +48,17 @@ int main(int argc, char* argv[])
         // Create a text file sink
         typedef sinks::synchronous_sink< sinks::text_file_backend > file_sink;
         shared_ptr< file_sink > sink(new file_sink(
-            keywords::file_name = "%Y%m%d_%H%M%S_%5N.log",      // file name pattern
-            keywords::rotation_size = 16384                     // rotation size, in characters
+            keywords::file_name = "file.log",                       // file name pattern
+            keywords::target_file_name = "%Y%m%d_%H%M%S_%5N.log",   // file name pattern
+            keywords::rotation_size = 16384                         // rotation size, in characters
             ));
 
         // Set up where the rotated files will be stored
         sink->locked_backend()->set_file_collector(sinks::file::make_collector(
-            keywords::target = "logs",                          // where to store rotated files
-            keywords::max_size = 16 * 1024 * 1024,              // maximum total size of the stored files, in bytes
-            keywords::min_free_space = 100 * 1024 * 1024,       // minimum free space on the drive, in bytes
-            keywords::max_files = 512                           // maximum number of stored files
+            keywords::target = "logs",                              // where to store rotated files
+            keywords::max_size = 16 * 1024 * 1024,                  // maximum total size of the stored files, in bytes
+            keywords::min_free_space = 100 * 1024 * 1024,           // minimum free space on the drive, in bytes
+            keywords::max_files = 512                               // maximum number of stored files
             ));
 
         // Upon restart, scan the target directory for files matching the file_name pattern