File tree 4 files changed +30
-14
lines changed 4 files changed +30
-14
lines changed Original file line number Diff line number Diff line change @@ -259,13 +259,31 @@ typedef enum TRITONSERVER_loglevel_enum {
259
259
TRITONSERVER_LOG_VERBOSE
260
260
} TRITONSERVER_LogLevel ;
261
261
262
+ /// Logging Formats
262
263
///
263
- /// Format of logging.
264
+ /// The TRITONSERVER API offers two logging formats. The formats have
265
+ /// a common set of fields but differ in how the timestamp for a log
266
+ /// entry is represented. Messages are serialized according to JSON
267
+ /// encoding rules by default. This behavior can be disabled by
268
+ /// setting the environment variable TRITON_SERVER_ESCAPE_LOG_MESSAGES
269
+ /// to "0".
264
270
///
265
- /// TRITONSERVER_LOG_DEFAULT: the log severity (L) and timestamp will be
266
- /// logged as "LMMDD hh:mm:ss.ssssss".
267
271
///
268
- /// TRITONSERVER_LOG_ISO8601: the log format will be "YYYY-MM-DDThh:mm:ssZ L".
272
+ /// 1. TRITONSERVER_LOG_DEFAULT
273
+ ///
274
+ /// <level><month><day><hour>:<min>:<sec>.<usec> <pid> <file>:<line>] <msg>
275
+ ///
276
+ /// Example:
277
+ ///
278
+ /// I0520 20:03:25.829575 3355 model_lifecycle.cc:441] "AsyncLoad() 'simple'"
279
+ ///
280
+ /// 2. TRITONSERVER_LOG_ISO8601
281
+ ///
282
+ /// <year>-<month>-<day>T<hour>:<min>:<sec>Z <level> <pid> <file>:<line>] <msg>
283
+ ///
284
+ /// Example:
285
+ ///
286
+ /// 2024-05-20T20:03:26Z I 3415 model_lifecycle.cc:441] "AsyncLoad() 'simple'"
269
287
///
270
288
typedef enum TRITONSERVER_logformat_enum {
271
289
TRITONSERVER_LOG_DEFAULT ,
Original file line number Diff line number Diff line change @@ -677,8 +677,8 @@ GetNormalizedModelConfig(
677
677
// to auto-complete.
678
678
RETURN_IF_ERROR (
679
679
AutoCompleteBackendFields (model_name, std::string (path), config));
680
- LOG_VERBOSE ( 1 ) << " Server side auto-completed config: "
681
- << config-> DebugString ( );
680
+
681
+ LOG_PROTOBUF_VERBOSE ( 1 , " Server side auto-completed config: " , (*config) );
682
682
683
683
RETURN_IF_ERROR (NormalizeModelConfig (min_compute_capability, config));
684
684
Original file line number Diff line number Diff line change @@ -603,8 +603,7 @@ InferenceServer::PrintBackendAndModelSummary()
603
603
repoagent_record.emplace_back (repoagent_pair.second );
604
604
repoagents_table.InsertRow (repoagent_record);
605
605
}
606
- std::string repoagents_table_string = repoagents_table.PrintTable ();
607
- LOG_INFO << repoagents_table_string;
606
+ LOG_TABLE_INFO (repoagents_table);
608
607
609
608
// Backends Summary
610
609
std::vector<std::string> backend_headers;
@@ -630,8 +629,8 @@ InferenceServer::PrintBackendAndModelSummary()
630
629
}
631
630
backends_table.InsertRow (backend_record);
632
631
}
633
- std::string backends_table_string = backends_table. PrintTable ();
634
- LOG_INFO << backends_table_string ;
632
+
633
+ LOG_TABLE_INFO (backends_table) ;
635
634
636
635
// Models Summary
637
636
auto model_states = model_repository_manager_->ModelStates ();
@@ -673,8 +672,8 @@ InferenceServer::PrintBackendAndModelSummary()
673
672
}
674
673
}
675
674
}
676
- std::string models_table_string = models_table. PrintTable ();
677
- LOG_INFO << models_table_string ;
675
+
676
+ LOG_TABLE_INFO (models_table) ;
678
677
679
678
return Status::Success;
680
679
}
Original file line number Diff line number Diff line change @@ -2554,8 +2554,7 @@ TRITONSERVER_ServerNew(
2554
2554
options_table.InsertRow (std::vector<std::string>{
2555
2555
" cache_enabled" , std::to_string (lserver->ResponseCacheEnabled ())});
2556
2556
2557
- std::string options_table_string = options_table.PrintTable ();
2558
- LOG_INFO << options_table_string;
2557
+ LOG_TABLE_INFO (options_table);
2559
2558
2560
2559
if (!status.IsOk ()) {
2561
2560
if (loptions->ExitOnError ()) {
You can’t perform that action at this time.
0 commit comments