本文整理汇总了C++中SuperLogger::set_format方法的典型用法代码示例。如果您正苦于以下问题:C++ SuperLogger::set_format方法的具体用法?C++ SuperLogger::set_format怎么用?C++ SuperLogger::set_format使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SuperLogger
的用法示例。
在下文中一共展示了SuperLogger::set_format方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: print_system_information
void CommandLineHandlerBase::print_system_information(SuperLogger& logger)
{
SaveLogFormatterConfig save_config(logger);
logger.set_format(LogMessage::Info, "{message}");
System::print_information(logger);
}
示例2: print_program_usage
void CommandLineHandler::print_program_usage(
const char* program_name,
SuperLogger& logger) const
{
SaveLogFormatterConfig save_config(logger);
logger.set_format(LogMessage::Info, "{message}");
LOG_INFO(logger, "usage: %s [project.appleseed]", program_name);
LOG_INFO(logger, "options:");
parser().print_usage(logger);
#ifdef _WIN32
const StringLogTarget& target =
static_cast<const StringLogTarget&>(logger.get_log_target());
const QString str = QString::fromStdString(target.get_string());
QMessageBox msgbox;
msgbox.setWindowTitle("appleseed.studio Program Usage");
msgbox.setIcon(QMessageBox::Information);
msgbox.setText("<pre>" + str + "</pre>");
msgbox.setStandardButtons(QMessageBox::Ok);
msgbox.setDefaultButton(QMessageBox::Ok);
msgbox.exec();
#endif
}
示例3: print_program_usage
void CommandLineHandler::print_program_usage(
const char* program_name,
SuperLogger& logger) const
{
SaveLogFormatterConfig save_config(logger);
logger.set_format(LogMessage::Info, "{message}");
LOG_INFO(logger, "usage: %s [options] input.appleseed output.appleseed", program_name);
LOG_INFO(logger, "options:");
parser().print_usage(logger);
}
示例4: print_program_usage
void CommandLineHandler::print_program_usage(
const char* executable_name,
SuperLogger& logger) const
{
SaveLogFormatterConfig save_config(logger);
logger.set_verbosity_level(LogMessage::Info);
logger.set_format(LogMessage::Info, "{message}");
LOG_INFO(logger, "usage: %s [options]", executable_name);
LOG_INFO(logger, "options:");
parser().print_usage(logger);
}
示例5: print_version_information
void CommandLineHandlerBase::print_version_information(SuperLogger& logger) const
{
SaveLogFormatterConfig save_config(logger);
logger.set_format(LogMessage::Info, "{message}");
LOG_INFO(
logger,
"%s, using %s version %s, %s configuration\n"
"compiled on %s at %s using %s version %s\n"
"copyright (c) 2010-2013 Francois Beaune, Jupiter Jazz Limited.\n"
"copyright (c) 2014 Francois Beaune, The appleseedhq Organization.\n"
"this software is released under the MIT license (http://www.opensource.org/licenses/mit-license.php).\n"
"visit http://appleseedhq.net/ for additional information and resources.",
impl->m_application_name.c_str(),
Appleseed::get_lib_name(),
Appleseed::get_lib_version(),
Appleseed::get_lib_configuration(),
Appleseed::get_lib_compilation_date(),
Appleseed::get_lib_compilation_time(),
Compiler::get_compiler_name(),
Compiler::get_compiler_version());
}