Start of the logging system replacement

This commit is contained in:
alex-xr555
2026-09-11 19:41:56 +03:00
parent 7d2340fb52
commit df674defe1
5 changed files with 327 additions and 27 deletions

View File

@@ -14,19 +14,24 @@
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
use crate::utils::log::error;
use crate::utils::log;
mod cli;
mod config;
mod core;
mod platform;
mod prelude;
mod utils;
use prelude::*;
/// Main entry point for DCR, a Cargo-like C/C++ project manager.
///
/// Collects command-line arguments via `std::env::args()` and dispatches to the
/// appropriate subcommand handler. With fewer than two arguments, shows help and
/// exits with code 0; otherwise exits with the handler's exit code.
fn main() {
log::init();
let args: Vec<String> = std::env::args().collect();
if args.len() < 2 {
@@ -61,7 +66,7 @@ fn main() {
"--help" => cli::help::help(),
"--update" => cli::flag_update::flag_update(rest),
_ => {
error("Unknown command or argument");
error!("Unknown command or argument");
1
}
};