Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit f2e7973

Browse files
committed
feat: add logging for flag NITRO_VERSION
1 parent 15313cb commit f2e7973

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

main.cc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#include "utils/nitro_utils.h"
2+
#include <algorithm>
23
#include <climits> // for PATH_MAX
34
#include <drogon/HttpAppFramework.h>
45
#include <drogon/drogon.h>
56
#include <iostream>
6-
#include <algorithm>
77

88
#if defined(__APPLE__) && defined(__MACH__)
99
#include <libgen.h> // for dirname()
@@ -41,6 +41,11 @@ int main(int argc, char *argv[]) {
4141
int logical_cores = std::thread::hardware_concurrency();
4242
int drogon_thread_num = std::max(thread_num, logical_cores);
4343
nitro_utils::nitro_logo();
44+
#ifdef NITRO_VERSION
45+
LOG_INFO << "Nitro version: " << NITRO_VERSION;
46+
#else
47+
LOG_INFO << "Nitro version: undefined";
48+
#endif
4449
LOG_INFO << "Server started, listening at: " << host << ":" << port;
4550
LOG_INFO << "Please load your model";
4651
drogon::app().addListener(host, port);

0 commit comments

Comments
 (0)