CPP01/ex06/src/main.cpp
2025-04-02 12:30:39 +02:00

50 lines
1.4 KiB
C++

/* ************************************************************************** */
/* */
/* :::::::: */
/* main.cpp :+: :+: */
/* +:+ */
/* By: whaffman <whaffman@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2025/03/24 14:30:26 by whaffman #+# #+# */
/* Updated: 2025/04/02 12:24:34 by whaffman ######## odam.nl */
/* */
/* ************************************************************************** */
#include "Harl.hpp"
int main(int argc, char **argv)
{
Harl harl;
int i;
if (argc != 2)
{
std::cout << "Usage: ./harlFilter [DEBUG/INFO/WARNING/ERROR]" << std::endl;
return (1);
}
for (i = 0; i < 4; i++)
{
if (argv[1] == harl.getLevel(i))
{
break;
}
}
switch (i)
{
case 0:
harl.complain("DEBUG");
case 1:
harl.complain("INFO");
case 2:
harl.complain("WARNING");
case 3:
harl.complain("ERROR");
break;
default:
std::cout << "[Please only complain for real problems!]" << std::endl;
break;
}
return (0);
}