Ignore:
Timestamp:
04/26/15 00:59:09 (9 years ago)
Author:
Maciej Komosinski
Message:

Renamed logging functions to more intuitive and simple names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/_demos/shapeconvert.cpp

    r372 r375  
    99
    1010#include <frams/model/model.h>
    11 #include <frams/mhandlers/stdouthandler.h>
     11#include <frams/loggers/loggertostdout.h>
    1212#include <frams/genetics/preconfigured.h>
    1313
     
    3434{
    3535        StdioFILE::setStdio();//setup VirtFILE::Vstdin/out/err
    36         MessageHandlerToStdout messages_to_stderr(MessageHandlerBase::Enable | MessageHandlerBase::DontBlock, VirtFILE::Vstderr); //errors -> stderr, don't interfere with stdout
     36        LoggerToStdout messages_to_stderr(LoggerBase::Enable | LoggerBase::DontBlock, VirtFILE::Vstderr); //errors -> stderr, don't interfere with stdout
    3737
    3838        PreconfiguredGenetics genetics;
     
    5050                                if ((shape != Part::SHAPE_ELLIPSOID) && (shape != Part::SHAPE_CUBOID) && (shape != Part::SHAPE_CYLINDER))
    5151                                {
    52                                         Hprintf("", "shapeconvert", HMLV_ERROR, "Invalid shape");
     52                                        logPrintf("", "shapeconvert", LOG_ERROR, "Invalid shape");
    5353                                        return 4;
    5454                                }
     
    7171        if (!m.isValid())
    7272        {
    73                 Hprintf("", "shapeconvert", HMLV_ERROR, "Cannot build Model from the supplied genotype");
     73                logPrintf("", "shapeconvert", LOG_ERROR, "Cannot build Model from the supplied genotype");
    7474                return 2;
    7575        }
     
    7777        if (m.getShape() != Model::SHAPE_OLD)
    7878        {
    79                 Hprintf("", "shapeconvert", HMLV_ERROR, "Only old style shapes can be converted");
     79                logPrintf("", "shapeconvert", LOG_ERROR, "Only old style shapes can be converted");
    8080                return 3;
    8181        }
Note: See TracChangeset for help on using the changeset viewer.