equal
deleted
inserted
replaced
62 // Destructor |
62 // Destructor |
63 EXPORT_C |
63 EXPORT_C |
64 CPhoneLogger::~CPhoneLogger() |
64 CPhoneLogger::~CPhoneLogger() |
65 { |
65 { |
66 #if (PHONEUI_LOGGING_OUTPUT == RDEBUG_LOGGING || PHONEUI_LOGGING_OUTPUT == FILE_LOGGING) |
66 #if (PHONEUI_LOGGING_OUTPUT == RDEBUG_LOGGING || PHONEUI_LOGGING_OUTPUT == FILE_LOGGING) |
67 iPool.Close(); |
67 iPool.Close(); |
68 #endif |
68 #endif |
69 } |
69 } |
70 |
70 |
71 // ----------------------------------------------------------------------------- |
71 // ----------------------------------------------------------------------------- |
72 // CPhoneLogger::CheckLogLevel |
72 // CPhoneLogger::CheckLogLevel |
75 // |
75 // |
76 TBool CPhoneLogger::CheckLogLevel( |
76 TBool CPhoneLogger::CheckLogLevel( |
77 TPhoneUILoggingLevel aLevel, |
77 TPhoneUILoggingLevel aLevel, |
78 TPhoneUILoggingComponent aLoggingComponent ) |
78 TPhoneUILoggingComponent aLoggingComponent ) |
79 { |
79 { |
80 __ASSERT_DEBUG( aLoggingComponent < iLogLevelArray.Count(), |
80 __ASSERT_DEBUG( aLoggingComponent < iLogLevelArray.Count(), |
81 Panic( EPhoneUtilsIndexOutOfBounds ) ); |
81 Panic( EPhoneUtilsIndexOutOfBounds ) ); |
82 |
82 |
83 return ( aLevel <= iLogLevelArray[aLoggingComponent] ); |
83 return ( aLevel <= iLogLevelArray[aLoggingComponent] ); |
84 } |
84 } |
85 |
85 |
498 TPtrC aString ) |
498 TPtrC aString ) |
499 { |
499 { |
500 iLoggingComponent = aLoggingComponent; |
500 iLoggingComponent = aLoggingComponent; |
501 iString = aString; |
501 iString = aString; |
502 TBuf<KMaxLogLineLength> str; |
502 TBuf<KMaxLogLineLength> str; |
503 switch( iLoggingComponent ) |
503 switch( iLoggingComponent ) |
504 { |
504 { |
505 case EPhoneControl: |
505 case EPhoneControl: |
506 str.Append( KPhoneUIControl ); |
506 str.Append( KPhoneUIControl ); |
507 break; |
507 break; |
508 |
508 |
509 case EPhonePhoneapp: |
509 case EPhonePhoneapp: |
510 str.Append( KPhoneUI ); |
510 str.Append( KPhoneUI ); |
511 break; |
511 break; |
512 |
512 |
513 case EPhoneUIView: |
513 case EPhoneUIView: |
514 str.Append( KPhoneUIView ); |
514 str.Append( KPhoneUIView ); |
515 break; |
515 break; |
516 |
516 |
517 case EPhoneUIStates: |
517 case EPhoneUIStates: |
518 str.Append( KPhoneUIStates ); |
518 str.Append( KPhoneUIStates ); |
519 break; |
519 break; |
520 |
520 |
521 case EPhoneUIUtils: |
521 case EPhoneUIUtils: |
522 str.Append( KPhoneUIUtils ); |
522 str.Append( KPhoneUIUtils ); |
523 break; |
523 break; |
524 |
524 |
525 case EPhoneMediatorCenter: |
525 case EPhoneMediatorCenter: |
526 str.Append( KPhoneMediatorCenter ); |
526 str.Append( KPhoneMediatorCenter ); |
527 break; |
527 break; |
528 |
528 |
529 default: |
529 default: |
530 break; |
530 break; |
531 } |
531 } |
532 |
532 |
533 str.Append( iString ); |
533 str.Append( iString ); |
534 str.Append( KLessThan ); |
534 str.Append( KLessThan ); |
535 |
535 |
536 CPhoneLogger * logger = static_cast<CPhoneLogger*>( |
536 CPhoneLogger * logger = static_cast<CPhoneLogger*>( |
537 CCoeEnv::Static( KUidPhoneUILoggerSingleton ) ); |
537 CCoeEnv::Static( KUidPhoneUILoggerSingleton ) ); |
543 |
543 |
544 // Destructor |
544 // Destructor |
545 EXPORT_C CPhoneMethodLogger::~CPhoneMethodLogger() |
545 EXPORT_C CPhoneMethodLogger::~CPhoneMethodLogger() |
546 { |
546 { |
547 TBuf<KMaxLogLineLength> str; |
547 TBuf<KMaxLogLineLength> str; |
548 switch( iLoggingComponent ) |
548 switch( iLoggingComponent ) |
549 { |
549 { |
550 case EPhoneControl: |
550 case EPhoneControl: |
551 str.Append( KPhoneUIControl ); |
551 str.Append( KPhoneUIControl ); |
552 break; |
552 break; |
553 |
553 |
554 case EPhonePhoneapp: |
554 case EPhonePhoneapp: |
555 str.Append( KPhoneUI ); |
555 str.Append( KPhoneUI ); |
556 break; |
556 break; |
557 |
557 |
558 case EPhoneUIView: |
558 case EPhoneUIView: |
559 str.Append( KPhoneUIView ); |
559 str.Append( KPhoneUIView ); |
560 break; |
560 break; |
561 |
561 |
562 case EPhoneUIStates: |
562 case EPhoneUIStates: |
563 str.Append( KPhoneUIStates ); |
563 str.Append( KPhoneUIStates ); |
564 break; |
564 break; |
565 |
565 |
566 case EPhoneUIUtils: |
566 case EPhoneUIUtils: |
567 str.Append( KPhoneUIUtils ); |
567 str.Append( KPhoneUIUtils ); |
568 break; |
568 break; |
569 |
569 |
570 case EPhoneMediatorCenter: |
570 case EPhoneMediatorCenter: |
571 str.Append( KPhoneMediatorCenter ); |
571 str.Append( KPhoneMediatorCenter ); |
572 break; |
572 break; |
573 |
573 |
574 default: |
574 default: |
575 break; |
575 break; |
576 } |
576 } |
577 str.Append( iString ); |
577 str.Append( iString ); |
578 str.Append( KGreaterThan ); |
578 str.Append( KGreaterThan ); |
579 |
579 |
580 CPhoneLogger * logger = static_cast<CPhoneLogger*>( |
580 CPhoneLogger * logger = static_cast<CPhoneLogger*>( |
581 CCoeEnv::Static( KUidPhoneUILoggerSingleton ) ); |
581 CCoeEnv::Static( KUidPhoneUILoggerSingleton ) ); |