/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2019, Danny Robson */ #include #include #include enum { ARG_SELF, ARG_LEVEL, ARG_VALUE, NUM_ARGS, }; int main (int const argc, char const **argv) { if (argc < NUM_ARGS) { fmt::print (stderr, "usage {} \n", argv[ARG_SELF]); return EXIT_FAILURE; } auto const level = cruft::log::to_level (argv[ARG_LEVEL]); auto const value = argv[ARG_VALUE]; cruft::log::write (level, "{}", value); return EXIT_SUCCESS; }