You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					80 lines
				
				2.1 KiB
			
		
		
			
		
	
	
					80 lines
				
				2.1 KiB
			| 
								 
											6 years ago
										 
									 | 
							
								//=============================================================================
							 | 
						||
| 
								 | 
							
								//
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								//  Copyright (c) 2015, 2020 Qualcomm Technologies, Inc.
							 | 
						||
| 
								 
											6 years ago
										 
									 | 
							
								//  All Rights Reserved.
							 | 
						||
| 
								 | 
							
								//  Confidential and Proprietary - Qualcomm Technologies, Inc.
							 | 
						||
| 
								 | 
							
								//
							 | 
						||
| 
								 | 
							
								//=============================================================================
							 | 
						||
| 
								 | 
							
								#ifndef __DIAGLOG_OPTIONS_HPP_
							 | 
						||
| 
								 | 
							
								#define __DIAGLOG_OPTIONS_HPP_
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#include <string>
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								#include "DlSystem/ZdlExportDefine.hpp"
							 | 
						||
| 
								 
											6 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 | 
							
								namespace zdl
							 | 
						||
| 
								 | 
							
								{
							 | 
						||
| 
								 | 
							
								namespace DiagLog
							 | 
						||
| 
								 | 
							
								{
							 | 
						||
| 
								 | 
							
								/** @addtogroup c_plus_plus_apis C++
							 | 
						||
| 
								 | 
							
								@{ */
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/// @brief .
							 | 
						||
| 
								 | 
							
								///
							 | 
						||
| 
								 | 
							
								/// Options for setting up diagnostic logging for zdl components.
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								class ZDL_EXPORT Options
							 | 
						||
| 
								 
											6 years ago
										 
									 | 
							
								{
							 | 
						||
| 
								 | 
							
								public:
							 | 
						||
| 
								 | 
							
								   Options() :
							 | 
						||
| 
								 | 
							
								      DiagLogMask(""),
							 | 
						||
| 
								 | 
							
								      LogFileDirectory("diaglogs"),
							 | 
						||
| 
								 | 
							
								      LogFileName("DiagLog"),
							 | 
						||
| 
								 
											6 years ago
										 
									 | 
							
								      LogFileRotateCount(20),
							 | 
						||
| 
								 | 
							
								      LogFileReplace(true)
							 | 
						||
| 
								 
											6 years ago
										 
									 | 
							
								   {
							 | 
						||
| 
								 | 
							
								      // Solves the empty string problem with multiple std libs
							 | 
						||
| 
								 | 
							
								      DiagLogMask.reserve(1);
							 | 
						||
| 
								 | 
							
								   }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								   /// @brief .
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								   ///
							 | 
						||
| 
								 
											6 years ago
										 
									 | 
							
								   /// Enables diag logging only on the specified area mask (DNN_RUNTIME=ON | OFF)
							 | 
						||
| 
								 | 
							
								   std::string DiagLogMask;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								   /// @brief .
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								   ///
							 | 
						||
| 
								 
											6 years ago
										 
									 | 
							
								   /// The path to the directory where log files will be written.
							 | 
						||
| 
								 | 
							
								   /// The path may be relative or absolute. Relative paths are interpreted
							 | 
						||
| 
								 | 
							
								   /// from the current working directory.
							 | 
						||
| 
								 | 
							
								   /// Default value is "diaglogs"
							 | 
						||
| 
								 | 
							
								   std::string LogFileDirectory;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								   /// @brief .
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								   ///
							 | 
						||
| 
								 
											6 years ago
										 
									 | 
							
								   //// The name used for log files. If this value is empty then BaseName will be
							 | 
						||
| 
								 | 
							
								   /// used as the default file name.
							 | 
						||
| 
								 | 
							
								   /// Default value is "DiagLog"
							 | 
						||
| 
								 | 
							
								   std::string LogFileName;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								   /// @brief .
							 | 
						||
| 
								 
											5 years ago
										 
									 | 
							
								   ///
							 | 
						||
| 
								 | 
							
								   /// The maximum number of log files to create. If set to 0 no log rotation
							 | 
						||
| 
								 
											6 years ago
										 
									 | 
							
								   /// will be used and the log file name specified will be used each time, overwriting
							 | 
						||
| 
								 | 
							
								   /// any existing log file that may exist.
							 | 
						||
| 
								 | 
							
								   /// Default value is 20
							 | 
						||
| 
								 | 
							
								   uint32_t LogFileRotateCount;
							 | 
						||
| 
								 
											6 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 | 
							
								   /// @brief
							 | 
						||
| 
								 | 
							
								   ///
							 | 
						||
| 
								 | 
							
								   /// If the log file already exists, control whether it will be replaced
							 | 
						||
| 
								 | 
							
								   /// (existing contents truncated), or appended.
							 | 
						||
| 
								 | 
							
								   /// Default value is true
							 | 
						||
| 
								 | 
							
								   bool LogFileReplace;
							 | 
						||
| 
								 
											6 years ago
										 
									 | 
							
								};
							 | 
						||
| 
								 | 
							
								/** @} */ /* end_addtogroup c_plus_plus_apis C++ */
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								} // DiagLog namespace
							 | 
						||
| 
								 | 
							
								} // zdl namespace
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#endif
							 |