#ifndef __BOOST_LOG_FILENAME_FACTORY_H_INCL #define __BOOST_LOG_FILENAME_FACTORY_H_INCL #include #include namespace boost { namespace log { /// filename factory method which passes the prototype through /// "strftime" inline log_types::log_name_string_type filename_factory_strftime (const log_types::log_name_string_type& proto) { char buf[FILENAME_MAX]; time_t t = time (0); tm tm = *localtime (&t); int len = strftime (buf, sizeof (buf), proto.c_str (), &tm); return (len == 0 ? proto : log_types::log_name_string_type (buf, len)); } } // namespace log } // namespace boost #endif // macro guard