mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 23:29:35 +00:00
Start of the logging system replacement
This commit is contained in:
@@ -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
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user