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.
		
		
		
		
		
			
		
			
				
					
					
						
							41 lines
						
					
					
						
							787 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							41 lines
						
					
					
						
							787 B
						
					
					
				
								
							 | 
						|
								#include "customloglevel.h"
							 | 
						|
								
							 | 
						|
								static log4cplus::tstring const CRITICAL_STRING (LOG4CPLUS_TEXT("CRITICAL"));
							 | 
						|
								static log4cplus::tstring const empty_str;
							 | 
						|
								
							 | 
						|
								
							 | 
						|
								static
							 | 
						|
								tstring const &
							 | 
						|
								criticalToStringMethod(LogLevel ll)
							 | 
						|
								{
							 | 
						|
								    if(ll == CRITICAL_LOG_LEVEL) {
							 | 
						|
								        return CRITICAL_STRING;
							 | 
						|
								    }
							 | 
						|
								    else {
							 | 
						|
								        return empty_str;
							 | 
						|
								    }
							 | 
						|
								}
							 | 
						|
								
							 | 
						|
								
							 | 
						|
								static
							 | 
						|
								LogLevel
							 | 
						|
								criticalFromStringMethod(const tstring& s) 
							 | 
						|
								{
							 | 
						|
								    if(s == CRITICAL_STRING) return CRITICAL_LOG_LEVEL;
							 | 
						|
								
							 | 
						|
								    return NOT_SET_LOG_LEVEL;
							 | 
						|
								}
							 | 
						|
								
							 | 
						|
								
							 | 
						|
								
							 | 
						|
								class CriticalLogLevelInitializer {
							 | 
						|
								public:
							 | 
						|
								    CriticalLogLevelInitializer() {
							 | 
						|
								        getLogLevelManager().pushToStringMethod(criticalToStringMethod);
							 | 
						|
								        getLogLevelManager().pushFromStringMethod(criticalFromStringMethod);
							 | 
						|
								    }
							 | 
						|
								};
							 | 
						|
								
							 | 
						|
								CriticalLogLevelInitializer criticalLogLevelInitializer_;
							 | 
						|
								
							 |