mirror of
				https://github.com/NVIDIA/nvidia-container-toolkit
				synced 2025-06-26 18:18:24 +00:00 
			
		
		
		
	Add debug log for command line arguments
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
		
							parent
							
								
									9d2363e12e
								
							
						
					
					
						commit
						75ce057878
					
				| @ -21,7 +21,6 @@ func main() { | |||||||
| // run is an entry point that allows for idiomatic handling of errors
 | // run is an entry point that allows for idiomatic handling of errors
 | ||||||
| // when calling from the main function.
 | // when calling from the main function.
 | ||||||
| func run(argv []string) (rerr error) { | func run(argv []string) (rerr error) { | ||||||
| 	logger.Debugf("Running %v", argv) |  | ||||||
| 	cfg, err := config.GetConfig() | 	cfg, err := config.GetConfig() | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return fmt.Errorf("error loading config: %v", err) | 		return fmt.Errorf("error loading config: %v", err) | ||||||
| @ -45,6 +44,7 @@ func run(argv []string) (rerr error) { | |||||||
| 		logger.Warnf("Invalid log-level '%v'; using '%v'", cfg.NVIDIAContainerRuntimeConfig.LogLevel, logger.Level.String()) | 		logger.Warnf("Invalid log-level '%v'; using '%v'", cfg.NVIDIAContainerRuntimeConfig.LogLevel, logger.Level.String()) | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | 	logger.Debugf("Command line arguments: %v", argv) | ||||||
| 	runtime, err := newNVIDIAContainerRuntime(logger.Logger, cfg, argv) | 	runtime, err := newNVIDIAContainerRuntime(logger.Logger, cfg, argv) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return fmt.Errorf("failed to create NVIDIA Container Runtime: %v", err) | 		return fmt.Errorf("failed to create NVIDIA Container Runtime: %v", err) | ||||||
|  | |||||||
| @ -33,7 +33,6 @@ const ( | |||||||
| 
 | 
 | ||||||
| // newNVIDIAContainerRuntime is a factory method that constructs a runtime based on the selected configuration and specified logger
 | // newNVIDIAContainerRuntime is a factory method that constructs a runtime based on the selected configuration and specified logger
 | ||||||
| func newNVIDIAContainerRuntime(logger *logrus.Logger, cfg *config.Config, argv []string) (oci.Runtime, error) { | func newNVIDIAContainerRuntime(logger *logrus.Logger, cfg *config.Config, argv []string) (oci.Runtime, error) { | ||||||
| 
 |  | ||||||
| 	lowLevelRuntimeCandidates := []string{dockerRuncExecutableName, runcExecutableName} | 	lowLevelRuntimeCandidates := []string{dockerRuncExecutableName, runcExecutableName} | ||||||
| 	lowLevelRuntime, err := oci.NewLowLevelRuntime(logger, lowLevelRuntimeCandidates) | 	lowLevelRuntime, err := oci.NewLowLevelRuntime(logger, lowLevelRuntimeCandidates) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user