File tree Expand file tree Collapse file tree 4 files changed +30
-14
lines changed Expand file tree Collapse file tree 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 {
259259  TRITONSERVER_LOG_VERBOSE 
260260} TRITONSERVER_LogLevel ;
261261
262+ /// Logging Formats 
262263/// 
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". 
264270/// 
265- /// TRITONSERVER_LOG_DEFAULT: the log severity (L) and timestamp will be 
266- /// logged as "LMMDD hh:mm:ss.ssssss". 
267271/// 
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'" 
269287/// 
270288typedef  enum  TRITONSERVER_logformat_enum  {
271289  TRITONSERVER_LOG_DEFAULT ,
Original file line number Diff line number Diff line change @@ -677,8 +677,8 @@ GetNormalizedModelConfig(
677677  //  to auto-complete.
678678  RETURN_IF_ERROR (
679679      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) );
682682
683683  RETURN_IF_ERROR (NormalizeModelConfig (min_compute_capability, config));
684684
Original file line number Diff line number Diff line change @@ -603,8 +603,7 @@ InferenceServer::PrintBackendAndModelSummary()
603603    repoagent_record.emplace_back (repoagent_pair.second );
604604    repoagents_table.InsertRow (repoagent_record);
605605  }
606-   std::string repoagents_table_string = repoagents_table.PrintTable ();
607-   LOG_INFO << repoagents_table_string;
606+   LOG_TABLE_INFO (repoagents_table);
608607
609608  //  Backends Summary
610609  std::vector<std::string> backend_headers;
@@ -630,8 +629,8 @@ InferenceServer::PrintBackendAndModelSummary()
630629    }
631630    backends_table.InsertRow (backend_record);
632631  }
633-   std::string backends_table_string = backends_table. PrintTable (); 
634-   LOG_INFO << backends_table_string ;
632+ 
633+   LOG_TABLE_INFO (backends_table) ;
635634
636635  //  Models Summary
637636  auto  model_states = model_repository_manager_->ModelStates ();
@@ -673,8 +672,8 @@ InferenceServer::PrintBackendAndModelSummary()
673672      }
674673    }
675674  }
676-   std::string models_table_string = models_table. PrintTable (); 
677-   LOG_INFO << models_table_string ;
675+ 
676+   LOG_TABLE_INFO (models_table) ;
678677
679678  return  Status::Success;
680679}
Original file line number Diff line number Diff line change @@ -2554,8 +2554,7 @@ TRITONSERVER_ServerNew(
25542554  options_table.InsertRow (std::vector<std::string>{
25552555      " cache_enabled"  , std::to_string (lserver->ResponseCacheEnabled ())});
25562556
2557-   std::string options_table_string = options_table.PrintTable ();
2558-   LOG_INFO << options_table_string;
2557+   LOG_TABLE_INFO (options_table);
25592558
25602559  if  (!status.IsOk ()) {
25612560    if  (loptions->ExitOnError ()) {
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments