NSPR学习笔记(一):PR_LOG的使用

#include "nspr.h"
#include <string>
#include <stdio.h>
#include <stdlib.h>

using namespace std;

int main()
{
	string strTest = "this is a test.";
	PR_SetLogFile("E:\\test.log");
	PR_LogPrint("%s", strTest.c_str());
	PR_LogPrint("%d.", 100);
	PR_LogPrint("2013年8月5日 火狐 22:45:13");
	return 0;
}

NSPR学习笔记(一):PR_LOG的使用_第1张图片

说明:
1、0代表线程计数,0为主线程;
2、[]里是打印此条log的线程句柄;
3、文件默认为ANSI编码,支持中文。

你可能感兴趣的:(NSPR学习笔记(一):PR_LOG的使用)