Separate monitoring function plugin
[platform/core/connectivity/stc-manager.git] / src / database / tables / table-counters.c
old mode 100644 (file)
new mode 100755 (executable)
index 9aec545..96c15c5
@@ -271,7 +271,7 @@ handle_error:
        return ret;
 }
 
-stc_error_e table_counters_get(uint64_t restriction_id,
+API stc_error_e table_counters_get(uint64_t restriction_id,
                               table_counters_info *info)
 {
        stc_error_e error_code = STC_ERROR_NONE;
@@ -299,8 +299,11 @@ stc_error_e table_counters_get(uint64_t restriction_id,
                        info->weekly_counter = sqlite3_column_int64(stmt, 3);
                        info->daily_counter = sqlite3_column_int64(stmt, 4);
 
-                       STC_LOGD("rstn_id [%llu] data_counters [%lld] bytes",
-                                restriction_id, info->data_counter);
+                       STC_LOGD("rstn_id[%llu] data[%lld] warn[%lld] "
+                               "monthly[%lld] weekly[%lld] daily[%lld]",
+                                restriction_id, info->data_counter,
+                                info->warn_counter, info->monthly_counter,
+                                info->weekly_counter, info->daily_counter);
                        break;
                case SQLITE_ERROR:
                default:
@@ -319,7 +322,7 @@ handle_error:
 }
 
 //LCOV_EXCL_START
-stc_error_e table_counters_update_counters(const table_counters_info *info)
+API stc_error_e table_counters_update_counters(const table_counters_info *info)
 {
        stc_error_e error_code = STC_ERROR_NONE;
        sqlite3_stmt *stmt = update_counter;
@@ -356,7 +359,7 @@ handle_error:
 }
 //LCOV_EXCL_STOP
 
-stc_error_e table_counters_get_timestamps(uint64_t restriction_id,
+API stc_error_e table_counters_get_timestamps(uint64_t restriction_id,
                                                                                table_counters_info *info)
 {
        stc_error_e error_code = STC_ERROR_NONE;
@@ -408,7 +411,7 @@ handle_error:
 }
 
 //LCOV_EXCL_START
-stc_error_e table_counters_update_timestamps(const table_counters_info *info)
+API stc_error_e table_counters_update_timestamps(const table_counters_info *info)
 {
        stc_error_e error_code = STC_ERROR_NONE;
        sqlite3_stmt *stmt = update_timestamp;
@@ -440,7 +443,7 @@ handle_error:
 //LCOV_EXCL_STOP
 
 
-stc_error_e table_counters_delete(uint64_t restriction_id)
+API stc_error_e table_counters_delete(uint64_t restriction_id)
 {
        stc_error_e error_code = STC_ERROR_NONE;
        sqlite3_stmt *stmt = delete_counter;