Changeset f039dba in mainline for uspace/lib/c/generic/io/logctl.c


Ignore:
Timestamp:
2012-08-17T09:57:27Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b1912b0c
Parents:
f72ae3b
Message:

Logger also works with hierarchy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/io/logctl.c

    rf72ae3b rf039dba  
    8181}
    8282
    83 int logctl_set_top_log_level(const char *namespace, log_level_t new_level)
    84 {
    85         async_exch_t *exchange = NULL;
    86         int rc = start_logger_exchange(&exchange);
    87         if (rc != EOK)
    88                 return rc;
    89 
    90         aid_t reg_msg = async_send_1(exchange, LOGGER_CTL_SET_TOP_LOG_LEVEL,
    91             new_level, NULL);
    92         rc = async_data_write_start(exchange, namespace, str_size(namespace));
    93         sysarg_t reg_msg_rc;
    94         async_wait_for(reg_msg, &reg_msg_rc);
    95 
    96         async_exchange_end(exchange);
    97 
    98         if (rc != EOK) {
    99                 return rc;
    100         }
    101 
    102         return (int) reg_msg_rc;
    103 }
    104 
    105 int logctl_set_log_level(const char *namespace, const char *context, log_level_t new_level)
     83int logctl_set_log_level(const char *logname, log_level_t new_level)
    10684{
    10785        async_exch_t *exchange = NULL;
     
    11290        aid_t reg_msg = async_send_1(exchange, LOGGER_CTL_SET_LOG_LEVEL,
    11391            new_level, NULL);
    114         rc = async_data_write_start(exchange, namespace, str_size(namespace));
    115         int rc2 = async_data_write_start(exchange, context, str_size(context));
     92        rc = async_data_write_start(exchange, logname, str_size(logname));
    11693        sysarg_t reg_msg_rc;
    11794        async_wait_for(reg_msg, &reg_msg_rc);
     
    12299                return rc;
    123100
    124         if (rc2 != EOK)
    125                 return rc2;
    126 
    127101        return (int) reg_msg_rc;
    128102}
Note: See TracChangeset for help on using the changeset viewer.