log system, support multi-thread, can work on WINNT and Linux