Roxen.git / server / etc / modules / Logger.pmod

version» Context lines:

Roxen.git/server/etc/modules/Logger.pmod:43:    data = data | ([]); // Make sure we don't modify the original mapping!    data->level = default_log_level;    }       string res = Standards.JSON.encode(data);    }          // Generate timestamps in ISO8601 extended format for Bunyan compatibility.    string get_bunyan_timestamp() { -  array(int) tod = System.gettimeofday(); +  array(int) tod; + #if constant(System.gettimeofday) +  tod = System.gettimeofday(); + #else +  tod = ({ time(1), 0, 0 }); + #endif    mapping gt = gmtime(tod[0]);    string ret = sprintf("%04d-%02d-%02dT%02d:%02d:%02d.%03dZ",    1900 + gt->year, 1+gt->mon, gt->mday,    gt->hour, gt->min, gt->sec,    tod[1]/1000);       return ret;    }       //! Override this method to implement custom merging of data into