#include "supertux/gameconfig.hpp"
#include "supertux/main.hpp"
#include "util/gettext.hpp"
-#include "util/log.hpp"
#include "version.h"
CommandLineArguments::CommandLineArguments() :
m_action(NO_ACTION),
+ m_log_level(LOG_WARNING),
fullscreen_size(),
fullscreen_refresh_rate(),
window_size(),
"\n"
"Usage: %s [OPTIONS] [LEVELFILE]\n\n"
"CommandLineArguments:\n"
+ " --verbose Print verbose messages\n"
+ " --debug Print extra verbose messages\n"
" -f, --fullscreen Run in fullscreen mode\n"
" -w, --window Run in window mode\n"
" -g, --geometry WIDTHxHEIGHT Run SuperTux in given resolution\n"
{
m_action = PRINT_DATADIR;
}
+ else if (arg == "--debug")
+ {
+ m_log_level = LOG_DEBUG;
+ }
+ else if (arg == "--verbose")
+ {
+ if (m_log_level < LOG_INFO)
+ {
+ m_log_level = LOG_INFO;
+ }
+ }
else if (arg == "--fullscreen" || arg == "-f")
{
use_fullscreen = true;
#include <boost/optional.hpp>
#include "math/size.hpp"
+#include "util/log.hpp"
#include "video/video_systems.hpp"
class Config;
private:
Action m_action;
+ LogLevel m_log_level;
public:
boost::optional<Size> fullscreen_size;
~CommandLineArguments();
Action get_action() const { return m_action; }
+ LogLevel get_log_level() const { return m_log_level; }
void parse_args(int argc, char** argv);