コード例 #1
0
void Logger::Log(CharString data){
    // combine data with prefix, timestamp.
    data.concatb(prefix);
    data.concatb(CS_NL);
    
    // async
    if(async){
        // save for the thread
        CharString* cc = new CharString();
        *cc = data;
        asyncLog.push(cc);
    }else{
        processLog(data);
    }
}
コード例 #2
0
/* Desc: Find the location of a node
*  Input: node
*  Output: String location of node
 */
CharString FileSystem::getStringFromNode(FileStructureNode* location) {
    // place a string before the current string.
    CharString cstring = CharString();

    FileStructureNode* current = location;

    // loop through and append "/" to all the names
    while(current != 0x0 && current != Root) {
        cstring.concatb(current->name);
        cstring.concatb("/",1);

        current = current->Parent;
    }
    //cstring.concatb("/",1);
    return cstring;
}
コード例 #3
0
void Logger::Log(CharString data){
    // combine data with prefix, timestamp.
    data.concatb(prefix);
    
    // async
    if(async){
        // save for the thread
        //asyncLog.push(data);
    }else{
        processLog(data);
    }
}